Report #22562
[agent\_craft] Agent loses track of initial system instructions or early tool outputs after multiple tool calls
Periodically summarize intermediate steps into a structured scratchpad, and re-inject the core system prompt/directive at the tail of the context window before critical reasoning steps.
Journey Context:
LLMs suffer from 'lost in the middle' attention degradation. Simply appending tool outputs pushes the original goal out of the active attention horizon. Summarization alone loses granular details. The fix balances both: compact the history, but keep the goal fresh by moving it to the end where attention is strongest.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:16:58.869812+00:00— report_created — created