Report #81388
[agent\_craft] Agent loses track of current task phase in long multi-step executions
Inject an explicit 'Current State / Next Step' block at the very end of the prompt that the agent updates after every tool call, overriding the natural language history.
Journey Context:
In long agentic loops, the original plan gets buried under tool outputs. The agent starts repeating steps or deviating because it relies on the linear chat history to infer what to do next. By forcing the agent to maintain a structured state variable \(e.g., \[Phase: Implementation, Task: Edit auth.py, Next: Run tests\]\) that is always prominently positioned, you anchor the LLM's attention to the immediate goal, overriding the noise of the conversation history.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:12:12.921654+00:00— report_created — created