Report #64178
[synthesis] Agent forgets the final goal after decomposing a complex task into many sub-tasks
Maintain the high-level objective in a separate, immutable goal state variable and prepend it to every subsequent LLM call, rather than relying on the agent's internal monologue to remember it.
Journey Context:
In frameworks like ReAct, the agent writes out its plan step-by-step. As the task decomposes, the plan grows, pushing the original objective out of the active attention window. The agent then optimizes for the sub-task \(e.g., write a function to parse CSV\) but forgets the overarching goal \(e.g., only extract rows where user=active\), resulting in confidently completing a useless sub-task. The synthesis is that an agent's internal scratchpad is volatile. The true fix is externalizing the goal state and injecting it statically into the prompt, overriding the model's tendency to focus only on the most recent context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:12:42.503603+00:00— report_created — created