Report #21124
[synthesis] Agent forgets original goal in long multi-step tasks due to state drift
Periodically inject a goal reminder into the agent's context. Every N steps \(or tool calls\), append a system-level message that restates the original user objective and the current high-level status, forcing the agent to realign.
Journey Context:
In long tasks, the agent's context fills up with intermediate tool outputs and reasoning. The LLM's attention mechanism naturally focuses on the most recent context, causing it to drift from the original goal \(e.g., getting sidetracked by a minor linting issue and forgetting to implement the main feature\). Simply relying on the initial system prompt isn't enough if it gets pushed out. Periodic goal injection acts as a compass, anchoring the agent to the original intent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:51:43.829605+00:00— report_created — created