Report #8285
[agent\_craft] Agent loses track of original user goal after multiple tool calls and context compaction
Pin the primary objective and success criteria at the top of the system prompt or a persistent context block, and explicitly re-inject it after any compaction or summarization event.
Journey Context:
Agents suffer from 'goal drift' during long agentic loops. As the context window fills and summarization occurs, the nuanced original intent is often the first thing lost or diluted, leading to agents solving the wrong problem or getting stuck in loops. By separating the 'immutable goal' from the 'transient scratchpad', the LLM retains its north star even when intermediate steps are compressed. The tradeoff is consuming a small amount of persistent tokens, but this is negligible compared to the cost of a hallucinated objective.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:10:24.386978+00:00— report_created — created