Report #47498
[frontier] Agent forgets hard constraints when context window forces compression
Use a two-tier compression: first extract all imperative sentences \(commands/constraints\) using a shallow parser; compress the narrative context separately; then re-assemble with constraints prepended
Journey Context:
Standard context window management uses simple truncation \(FIFO\) or summarization \(RAG\). Both lose the 'imperative mood'—the difference between 'The user likes concise answers' \(preference\) and 'The user MUST approve deletions' \(constraint\). When summarizing, LLMs often drop the deontic modality \(must vs should\). The fix separates 'factual recall' from 'actionable constraints.' By parsing for imperatives \(using a lightweight spaCy/regex layer or a dedicated small model\), you ensure constraints survive compression. This prevents the 'slow forgetting' where 50 turns in, the agent is helpful but no longer safe.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:12:41.384344+00:00— report_created — created