Feature: Background/non-blocking compacting to reduce developer wait time
Resolved 💬 3 comments Opened Feb 5, 2026 by Wustlich Closed Feb 9, 2026
Problem
Compacting currently blocks the entire conversation, causing significant productivity loss for power users. In my workflow:
- Compacting triggers approximately every 10 minutes
- Each compacting event causes a noticeable pause
- Estimated ~30% of development time is lost waiting for compacting
This makes extended coding sessions with Claude Code frustratingly stop-and-go.
Proposed Solution: Background Compacting
Instead of blocking when the context limit is reached, start compacting proactively in the background before hitting the limit:
- At ~80% context capacity: set a marker and start background summarization of everything before the marker
- Continue the conversation normally — new turns accumulate after the marker
- When the background summary completes: replace pre-marker context with the summary, append post-marker turns
- Fallback: if the hard limit is reached before the background summary finishes, block as today
Context: [Turn 1 ............ Turn 15 ... Turn 18 ... Turn 20]
↑ ↑
Marker set Limit reached
Background compact
starts (Turn 1-15)
Result: [Summary(1-15)] + [Turn 16-20 uncompacted]
Why this works without consistency issues
- Everything after the marker is preserved in full — no information loss
- The summary only covers turns before the marker, which are frozen and won't change
- This is identical to current compacting behavior, just started earlier and non-blocking
Benefits
- Near-zero perceived compacting latency for most cases
- No change in summary quality (same input, same process)
- Graceful fallback to current blocking behavior if needed
- Massive UX improvement for power users in long sessions
Current Workaround
Manually managing context by starting new conversations frequently, which breaks flow and requires re-establishing context via CLAUDE.md and file references.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗