Report #78741
[agent\_craft] Agent slowly deviates from original formatting or constraint rules over a long multi-step session
Periodically inject a 'reminder' of the core constraints \(e.g., output format, forbidden actions\) into the latest user/assistant turn, rather than relying solely on the system prompt at the top.
Journey Context:
Due to recency bias and the 'lost in the middle' effect, instructions given thousands of tokens ago lose their weight. If an agent is supposed to output JSON but has been doing natural language reasoning for 10 steps, it will likely output natural language. By dynamically appending a condensed version of the output schema to the most recent prompt, you anchor the agent back to the required format.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:45:56.910516+00:00— report_created — created