Compaction hangs indefinitely — session completely frozen, requires terminal kill
Version: 2.1.119 (Claude Code)
OS: Linux (CachyOS, kernel 7.0.0-1-cachyos)
Description
When context compaction triggers — either automatically (auto-compact) or manually via /compact — Claude Code freezes completely and never recovers. The UI shows no progress and accepts no input. Ctrl+C has no effect. The only recovery is to kill the terminal process and restart the session, losing all session state.
Frequency
Happened multiple times in a single day across different sessions, including shorter sessions (not just long/heavy ones).
Steps to reproduce
- Start a session (length does not need to be extreme)
- Either wait for auto-compaction to trigger, or run
/compactmanually - Session freezes — spinner or blank state, no output, no response to any input
- Ctrl+C unresponsive — terminal must be killed externally
Expected behavior
Compaction completes (or times out with an error) and the session resumes.
Actual behavior
Indefinite hang. No timeout, no error, no recovery path short of killing the terminal.
Workaround
Set "autoCompact": false in ~/.claude/settings.json and avoid /compact.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗