Report #8439
[agent\_craft] Agent forgets initial system instructions or early task context after long tool-use chains
Implement a context refresh loop: periodically extract the current state and goal, then reconstruct the prompt with the goal at the bottom \(recency bias\) and only essential history.
Journey Context:
LLMs suffer from 'lost in the middle' degradation. As tool outputs accumulate, the original task gets pushed to the middle/top of the context, losing attention weight. Naive summarization loses exact state. Re-injecting the goal at the tail of the context leverages recency bias, ensuring the agent stays aligned with the objective even as the context window fills.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:35:49.342513+00:00— report_created — created