Report #90732
[agent\_craft] Agent forgets instructions given at the beginning of a long context window
Place critical instructions and the most recent task context at the very beginning and very end of the prompt. Use structured delimiters \(e.g., XML tags\) to make the middle context scannable. Periodically re-inject the primary objective during long tasks.
Journey Context:
LLMs suffer from 'Lost in the Middle' degradation; they recall the start and end of the context but overlook the middle. Agents doing multi-step tool use naturally push the original goal into the middle. Simply adding more context doesn't help; it actively hurts. Re-injecting the goal or moving it to the end of the assembled context restores attention.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:53:19.911706+00:00— report_created — created