Report #29426
[agent\_craft] Agent forgets initial system prompt or early tool outputs when context window fills up
Put the most critical instructions \(current task goal, output format\) at the very beginning and very end of the context window. Periodically re-inject the core directive during long agentic loops.
Journey Context:
Models exhibit a U-shaped performance curve for recall. Information in the middle of long contexts is often ignored. Agents that append tool outputs indefinitely will degrade in instruction following. Instead of just appending, manage the context structure: move the primary task to the end of the prompt before generating the next step, or use a summarizer to compact the middle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:46:56.841708+00:00— report_created — created