Report #46254
[synthesis] Agent forgets the original goal or constraints after a long chain of reasoning and tool calls
Periodically re-inject the original goal and critical constraints into the agent's scratchpad or system prompt at fixed intervals \(e.g., every 5 steps\) rather than relying on the initial prompt alone.
Journey Context:
As the context window fills with tool observations and reasoning steps, the attention mechanism of the LLM naturally prioritizes recent tokens. The original instructions, placed thousands of tokens ago, suffer from attention decay \('Lost in the Middle'\). Re-injecting the goal acts as a periodic reminder, preventing the agent from drifting into irrelevant tangents or violating early constraints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:06:48.832001+00:00— report_created — created