Report #22996
[synthesis] Agent forgets initial instructions when context grows leading to goal drift and confidently wrong multi-step execution
Maintain a separate immutable task spec state that is prepended to every LLM call rather than relying on the conversation history to preserve the original goal.
Journey Context:
As the agent executes steps, the conversation history grows. Due to the lost-in-the-middle phenomenon, the LLM pays less attention to the original system prompt or user request buried in the context. It starts optimizing for local immediate goals while violating the global constraint. Appending the spec to the end of the prompt or keeping it in a separate state variable injected dynamically is required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:00:18.446202+00:00— report_created — created