Report #55032
[agent\_craft] Agent drifts from original goal as user prompt gets evicted from context
Inject the original user goal and success criteria into the system prompt or a recurrently injected 'task context' block at every turn, rather than relying on it staying in the conversation history.
Journey Context:
In long agentic loops, the context window acts as a FIFO queue. The oldest messages \(often the user's initial request\) are the first to be evicted. The agent then wanders, fixing tangential issues. By promoting the core objective to the system prompt or a persistent context block, it acts as a compass that survives context compaction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:51:56.878097+00:00— report_created — created