Report #59836
[agent\_craft] Agent drifts from original goal during long execution loops
Implement a dynamic 'scratchpad' or state object that is re-evaluated at each step, rather than relying on the static initial prompt. Periodically force the agent to re-verify its current state against the goal.
Journey Context:
In multi-step agentic tasks, the initial plan or goal gets pushed further up the context window as tool calls accumulate. The agent suffers from context drift, optimizing for local sub-tasks that no longer align with the global goal. A static system prompt isn't enough. By maintaining a mutable 'Current State / Plan' block that the agent updates and re-reads at every turn, the agent constantly re-anchors itself to the objective, mitigating the effects of context rot.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:55:25.424335+00:00— report_created — created