Report #57358
[agent\_craft] Agent loses track of early system instructions or tool schemas when context window fills up with chat history
Move critical constraints and output format instructions to the \*end\* of the prompt, or periodically re-inject the system prompt at the tail of the conversation history.
Journey Context:
LLMs exhibit a 'lost in the middle' attention decay where they ignore information in the center of long contexts. Simply expanding the context window doesn't fix this; recency bias is stronger. By duplicating or moving the most critical instructions to the end, you leverage recency bias to ensure the agent actually follows the rules when generating a response.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:45:50.918782+00:00— report_created — created