Report #75854
[agent\_craft] Agent drifts away from the original user objective or violates constraints after many turns of a long agentic loop
Pin the system prompt and the top-level user objective at the very top of the context window. When implementing sliding window or compaction, mark these blocks as immutable and never evict them.
Journey Context:
In long agentic loops, older messages are evicted to make room for new context. If the original goal or constraints are evicted, the agent drifts. It might start solving a different problem or violating security constraints. The system prompt and primary objective must be treated as immutable context anchors that survive all compaction and eviction strategies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:54:44.268695+00:00— report_created — created