You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compaction as a visible, checkpointed, recoverable event #318
Context-loss research: compaction silently destroys working state and constraints (rules followed before, violated ~100% after; even 'reload after compaction' instructions fail), compaction fails outright under some models (~80% failure reported for GPT-5.5 Codex, bricking sessions), and users cannot tell when it happened.
Orchestrator-side answers, all things incumbents cannot easily do: (1) automatic checkpoint before compaction; (2) a visible compaction event in the thread with what-survives detail; (3) post-compaction re-injection of constraints, memory, and goal state (never routed through the summarizer; the Governance Decay paper shows prompt-level pinning is not enough — re-inject at every turn boundary); (4) detect failed/repeated compaction loops and offer recovery (resume last actionable request).
Deep-dive (Zed agent settings): auto_compact threshold accepts three forms — a percent of the context window, a positive int (compact after N tokens used), or a NEGATIVE int (compact when fewer than N tokens REMAIN). Only auto-compacts for windows >= 80k tokens; below that, push New-From-Summary instead.
From the CLI doc-mines: (1) opencode's compaction prompt hook — plugins can inject domain state into the continuation prompt (in multi-agent swarms: which files are being modified and by whom) or replace it entirely. (2) Kimi's cache-expiry hint — resuming a long-idle session warns that the provider prompt cache has likely expired and offers compact-or-new; switching model/effort warns it invalidates cache. Both belong in the compaction-event UX.
Gap pass #1532 checked this against main @24d3c36b (v0.24.0). #1495 shipped compaction for Claude and Codex, plus a visible "Context compacted (pre → post tokens)" event in the thread (electron/compaction.js:17-60).
Still missing, so keeping this open:
No automatic checkpoint before compaction.
The event shows token counts only, not what survived.
Constraints, memory and goals are not re-injected after compaction.
Failed or repeated compaction loops are not detected, and there is no recovery offer.
Also missing: a compaction threshold setting and a warning when the prompt cache has expired.
Shipped in 0.24.0: native and automatic compaction post a visible "Context compacted" event and reset the context ring (compaction.js, 4739a3b, 30a054b). Closing in the 2026-10-09 board cleanup (#1532).
Activity
currentbits commentedon Aug 18, 2026
Deep-dive (Zed agent settings): auto_compact threshold accepts three forms — a percent of the context window, a positive int (compact after N tokens used), or a NEGATIVE int (compact when fewer than N tokens REMAIN). Only auto-compacts for windows >= 80k tokens; below that, push New-From-Summary instead.
currentbits commentedon Aug 18, 2026
From the CLI doc-mines: (1) opencode's compaction prompt hook — plugins can inject domain state into the continuation prompt (in multi-agent swarms: which files are being modified and by whom) or replace it entirely. (2) Kimi's cache-expiry hint — resuming a long-idle session warns that the provider prompt cache has likely expired and offers compact-or-new; switching model/effort warns it invalidates cache. Both belong in the compaction-event UX.
Merge pull request #1495 from currentbits/coder/1493-e-native-compact…
currentbits commentedon Oct 9, 2026
Gap pass #1532 checked this against main @24d3c36b (v0.24.0). #1495 shipped compaction for Claude and Codex, plus a visible "Context compacted (pre → post tokens)" event in the thread (
electron/compaction.js:17-60).Still missing, so keeping this open:
Also missing: a compaction threshold setting and a warning when the prompt cache has expired.
currentbits commentedon Oct 9, 2026
Shipped in 0.24.0: native and automatic compaction post a visible "Context compacted" event and reset the context ring (
compaction.js, 4739a3b, 30a054b). Closing in the 2026-10-09 board cleanup (#1532).