Report #26519
[agent\_craft] Agent violates core constraints after a context compaction event
During compaction, do not summarize the system prompt. Always append the verbatim, uncompacted system prompt to the front of the newly compacted context, and include a Current State section that explicitly re-states the active constraints and goals.
Journey Context:
When context grows too large, frameworks often summarize the entire history, including the system prompt, into a brief paragraph. The LLM then treats this summarized constraint as a soft suggestion rather than a hard rule. The alternative is to treat the system prompt as immutable and the conversation history as disposable. This ensures the agent's personality and hard rules survive compaction events.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:54:56.866503+00:00— report_created — created