Report #1636
[agent\_craft] Agent forgets initial instructions after long tool chain execution
Re-inject the primary system prompt and the current task objective at the top of the LLM context at every turn, or use a context manager that prioritizes the start and end of the context window.
Journey Context:
LLMs suffer from 'lost in the middle' degradation. As tool outputs accumulate, the original goal gets buried in the middle of the context history. Simply appending to history assumes equal attention across all tokens. The tradeoff is the token cost of repeating the prompt vs. the risk of instruction drift. Re-injection is the right call because failing the primary objective invalidates all other work.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T05:31:36.635297+00:00— report_created — created