Report #29613
[agent\_craft] Agent loses track of primary instructions after multiple tool calls
Re-inject the core task directive at the end of the context window \(or in the latest user turn\) after every N tool calls, 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 to the top of the context and attention wanes. Re-stating the goal in the latest turn ensures the highest attention weights are on the primary objective, preventing context rot where the agent forgets why it started.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:05:48.914405+00:00— report_created — created