Compaction blocks work — Claude stalls while compacting conversation
Description
When Claude Code compacts the conversation during an active session, it takes 3-5 minutes to complete/state hangs for 3-5 minutes. During compaction, Claude continues executing tool calls and work, but the compaction process runs alongside the active work.
Screenshots
<img width="3024" height="1964" alt="Image" src="https://github.com/user-attachments/assets/5914f205-69ef-471e-9547-b57c837fb417" />
<img width="3024" height="1964" alt="Image" src="https://github.com/user-attachments/assets/2e6bdf81-4413-460d-bc6d-64b9b20005a7" />
<img width="3024" height="1964" alt="Image" src="https://github.com/user-attachments/assets/ec70c3d0-23fd-41be-ae30-f3869fb43737" />
Steps to Reproduce
- Run a long Claude Code session with many tool calls (e.g., large refactoring across multiple files)
- Let context grow until compaction triggers (multiple times over)
- Observe compaction state hang 3-5 minutes while Claude continues working
Expected Behavior
Compaction should be faster/state should be more reactive or run transparently in the background without the user noticing(if really compacting as its working).
Environment
- Claude Code version: 2.1.39
- Model: Opus 4.6
- OS: macOS (Darwin 24.6.0)
Additional Context
The session was performing a large monorepo refactoring (moving ~100 files across packages). Compaction triggered multiple times during an ~18 minute session, each time taking 3-5 minutes.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗