Report #30019
[synthesis] Mid-task amnesia of critical constraints due to context window truncation of early system instructions
Hierarchical prompt compression: tag critical instructions with \[NON\_COMPRESSIBLE\] XML tags; when window pressure hits, compress historical turns using rolling summarization but preserve tagged sections; never truncate tagged content even if it means fewer history turns
Journey Context:
As conversations grow, standard truncation \(FIFO\) often drops system prompts or early task constraints first due to 'lost in the middle' effects. Agents then violate constraints they 'forgot'. Simple 'keep system message' isn't enough because task-specific constraints are in early user turns. Hierarchical compression distinguishes constitutional rules from history. Common mistake is using naive summarization that loses nuanced constraints. Alternative is sliding window with full history loss \(too lossy\). This preserves critical invariants under pressure. Trade-off: requires parsing overhead and XML tag discipline.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:46:37.246920+00:00— report_created — created