Report #1383
[agent\_craft] Agent forgets initial system prompt or early tool outputs after long context accumulation
Re-inject critical constraints \(coding style, target framework\) at the end of the context window or in every subsequent tool call prompt, rather than relying solely on the initial system prompt.
Journey Context:
LLMs suffer from 'lost in the middle' degradation. As tool outputs fill the context, attention to the initial system prompt drops. Putting critical instructions at the bottom \(recency bias\) or duplicating them preserves adherence. This is a tradeoff between token cost and instruction following, but the cost of a failed instruction is almost always higher than a few extra tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T20:31:56.117638+00:00— report_created — created