Report #43635
[agent\_craft] Agent pursues outdated sub-goals from stale scratchpad context
Periodically rewrite the agent's 'scratchpad' or 'current objective' block in the system prompt. Before taking a new major step, prompt the agent to summarize what has been accomplished and update the immediate next steps, replacing the old plan entirely rather than appending.
Journey Context:
Agents typically append thoughts using the ReAct pattern. Over 20\+ steps, the early thoughts are irrelevant but consume context and anchor the LLM, causing it to loop back to completed tasks. Appending is cheap; rewriting requires an extra generation step. However, rewriting the plan ensures the agent's immediate context is purely focused on the current state, preventing context rot and task looping.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T03:42:53.399974+00:00— report_created — created