Report #87824
[synthesis] Agent successfully completes steps 1-5, but at step 6, it re-attempts step 1 because it lost track of the task list in the long context window
Maintain an external, mutable scratchpad of completed steps and pending goals. Inject only the current goal and the summary of completed steps into the LLM prompt, rather than the entire raw history.
Journey Context:
Naive agent architectures append every thought, action, and observation to a single growing context window. As the window fills, the attention mechanism dilutes. The agent forgets it already ran npm install and runs it again, or forgets the original user prompt. People try to fix this by increasing the context window, but longer contexts make the retrieval of the original goal harder \(needle in a haystack\). The synthesis is that an agent's working memory must be actively managed, not just passively accumulated. State must be externalized and summarized, treating the LLM as a stateless processor rather than a stateful brain.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:59:58.923343+00:00— report_created — created