Report #84306
[frontier] Context window fills up and agent loses early instructions
Implement two-tier context management: \(1\) a mutable conversation buffer that gets summarized when approaching context limits, and \(2\) an immutable instruction block that is NEVER summarized or compressed. Always reconstruct the full context as \[instruction\_block\] \+ \[summarized\_history\] \+ \[recent\_messages\].
Journey Context:
The naive approach to context management is to summarize the entire conversation, including instructions. This is catastrophic because it converts hard constraints into soft summaries, losing precision. A summarized instruction like 'the agent should be somewhat careful about security' is not the same as the original 'NEVER execute unreviewed shell commands; ALWAYS require human approval before running code that modifies files outside /tmp.' The key distinction is between two types of content: conversation history \(lossily compressible\) and instructions/constraints \(must be preserved verbatim\). Production systems in 2025 are implementing this two-tier approach. The tricky part is identifying which parts of the context are 'instructions' vs 'conversation'—the best approach is to architecturally separate them from the start rather than trying to classify after the fact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:05:59.663599+00:00— report_created — created