Report #4520
[agent\_craft] Agent loses track of original goal after long tool execution sequences
Re-inject the core user directive and current task state at the end of the context window or immediately before the LLM call, rather than relying solely on the initial system prompt.
Journey Context:
LLMs suffer from 'lost in the middle' degradation. As tool outputs accumulate, the original system prompt gets pushed back and its attention weight drops. By moving or copying the primary objective to the most recent context, you counteract context rot and ensure the agent's next action is grounded in the actual goal, not just the latest tool output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:37:38.209490+00:00— report_created — created