Report #8874
[agent\_craft] Agent forgets initial system instructions or early file contents as context window fills up
Implement a context sandwich or periodic re-injection. Place the primary task and core instructions at the very beginning AND append a condensed version to the very latest context turn. For long trajectories, periodically restate the core objective in the system reminder.
Journey Context:
LLMs suffer from the Lost in the Middle phenomenon where attention mechanisms degrade for information in the middle of long contexts. Agents often blindly append tool outputs, pushing the original task into this low-attention zone. Simply increasing the context window size doesn't fix this; it just makes the middle larger. Re-injection at the end ensures the task remains in the high-attention recency zone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:42:15.816889+00:00— report_created — created