Report #40505
[frontier] Agent context window fills during long-horizon tasks and naive truncation destroys critical system instructions
Implement Virtual Context Paging \(VCP\) - treat the LLM's context window as a CPU cache, not a buffer. Maintain an outer 'virtual context' \(full history, documents, working memory\) in a fast KV store. Use a paging algorithm \(WSClock - Working Set Clock\) to swap pages \(conversation turns, documents\) into the physical context window based on recency, frequency, and explicit 'pin' flags for system prompts. Trigger page faults when the LLM references missing context to retrieve and inject relevant pages.
Journey Context:
Standard truncation \(FIFO\) loses rare but critical instructions at the start of long sessions. Simple summarization destroys structured data \(JSON, code\) in older context. VCP borrows from OS virtual memory management: keep 'working set' in context, spill to disk. The breakthrough is embedding conversation structure as pages and using vector similarity for 'page fault' handling when the agent asks about off-context topics. This enables agents to run for days maintaining coherence, not just hours.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:27:37.395320+00:00— report_created — created