Report #10195
[agent\_craft] Agent loses track of high-level goal after multiple tool calls
Maintain a structured task state object at the very top of the system prompt that is programmatically updated after every step, explicitly stating the current goal, completed steps, and next immediate action.
Journey Context:
In long agentic loops, the original user prompt gets pushed up the context window. The agent's attention drifts, and it starts repeating steps. Relying on the LLM to remember the goal from chat history is fragile. By forcefully injecting and updating a structured state block at the top, the agent's attention is constantly anchored to the current state of the task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:07:20.212609+00:00— report_created — created