[BUG] Freezing Issues at Session Resuming (with `claude --continue` and `claude --resume`) after Ctrl+C interruption on Windows
Bug Report: Freezing Issues at Session Resuming (with claude --continue and claude --resume) after Ctrl+C interruption on Windows
---
Bug Summary
claude --continue permanently freezes after Ctrl+C interruption - survives reinstalls and persists system-wide
Description
CRITICAL: claude --continue experiences complete and permanent freezing after a specific trigger event on Windows. The issue persists across Claude Code reinstalls, chat log deletion, and different shells/directories, indicating system-level state corruption.
Trigger Event: Interrupting Claude Code with Ctrl+C during command execution that encounters errors, then retrying other commands before exit.
Post-trigger Behavior: All subsequent claude --continue attempts result in complete terminal freeze requiring force-kill, regardless of shell (PowerShell, CMD, Git Bash) or working directory. claude --resume experiences temporary UI freezing but eventually recovers.
Environment Details
- OS: Windows 11
- Shell: PowerShell
- Claude Code Installation: npm (
npm install -g claude-code) - Node.js: Managed via Volta (installed via Scoop
scoop install voltathenvolta install node) - Git:
- Git for Windows (installed via Scoop
scoop install git) - Git Bash path declared as
$env:CLAUDE_CODE_GIT_BASH_PATH = "$env:USERPROFILE\scoop\apps\git\current\bin\bash.exe"
Reproduction Steps
Trigger Sequence (One-time corruption event)
- Install Claude Code via npm:
npm install -g claude-code - Start any Claude Code session in PowerShell
- Run commands that encounter errors
- Interrupt with Ctrl+C during error handling (Claude retrying other commands)
- Exit the session with Ctrl+C
Permanent Impact (Persists after trigger)
- Any subsequent
claude --continueattempt from any shell/directory → Complete freeze - Cross-shell corruption: Trigger in PowerShell corrupts all shells (PowerShell, CMD, Git Bash)
- Reinstalling Claude Code → Issue persists
- Deleting chat logs/sessions → Issue persists
- Different working directories → Issue persists
Specific Behaviors
claude --continue
- Before trigger event: Works normally
- After trigger event: PERMANENTLY broken - completely freezes every time
- Persistence: Survives Claude Code reinstalls, log deletion, system reboots
- Cross-shell impact: PowerShell trigger corrupts functionality in PowerShell, CMD, and Git Bash
- System-wide: Affects all directories and user contexts
- Location: Freeze occurs after entering chat session, at prompt level
- Debug messages before freeze:
[DEBUG] AutoUpdaterWrapper: Installation type: unknown, using native: false
[DEBUG] Shell snapshot created successfully (5007 bytes)
[DEBUG] AutoUpdater: Detected installation type: unknown
[DEBUG] AutoUpdater: Unknown installation type, falling back to config
claude --resume
- Successfully lists available sessions
- Freezes at session selection interface (arrow keys and Enter unresponsive)
- Duration is variable (from dozens of seconds to several minutes)
- Eventually becomes responsive, allowing session selection and normal operation
- Location: Freeze occurs after showing session list, during interactive selection
Debug Investigation
Debug Output Analysis
claude --resume --debug
During freeze period:
- No debug messages appear (complete silence)
- Process appears hung but isn't consuming high resources
After freeze ends, repeated auto-updater messages appear:
[DEBUG] AutoUpdaterWrapper: Installation type: unknown, using native: false
[DEBUG] AutoUpdater: Detected installation type: unknown
[DEBUG] AutoUpdater: Unknown installation type, falling back to config
[DEBUG] AutoUpdaterWrapper: Installation type: unknown, using native: false
[DEBUG] AutoUpdater: Detected installation type: unknown
[DEBUG] AutoUpdater: Unknown installation type, falling back to config
[DEBUG] AutoUpdater: Detected installation type: unknown
[DEBUG] AutoUpdater: Unknown installation type, falling back to config
Expected Behavior
- Session loading should be fast and responsive
--continueshould resume most recent session without hanging--resumeshould show session selection promptly- Auto-updater should detect npm installation type correctly
Actual Behavior
- Variable freeze duration during session loading operations
- No debug output during freeze - suggests hang before debug logging starts
- Auto-updater runs in loop after freeze - separate issue from the freeze itself
- Different freeze patterns between
--continue(complete hang) and--resume(eventual recovery)
Technical Analysis
Updated Root Cause Assessment
Based on debug investigation, there are two distinct freeze locations:
--continue Freeze (Post-initialization)
- Prompt-level hang: Freeze occurs after successful session restoration, at interactive prompt
- Shell snapshot success: System successfully creates shell snapshot (5007 bytes)
- Auto-updater correlation: Freeze happens immediately after auto-updater "fallback to config" message
- Complete lockup: Requires force termination
--resume Freeze (Interactive UI)
- UI responsiveness issue: Freeze occurs at interactive selection interface
- Input handling bottleneck: Arrow keys and Enter become unresponsive
- Variable duration: Eventually recovers, improves with subsequent attempts
- Session listing works: Successfully displays available sessions before freeze
Freeze Location Mapping
| Command | Freeze Location | Debug Output Before Freeze | Recovery |
|---------|-----------------|----------------------------|----------|
| --continue | After entering chat session (prompt level) | Shell snapshot + auto-updater messages | Requires force-kill |
| --resume | Interactive session selection interface | Auto-updater messages (after recovery) | Eventually recovers |
Performance Characteristics
- Resource Usage: Normal/low CPU and RAM during freeze
- Duration: Variable (dozens of seconds to several minutes)
- Pattern: Reduces over multiple attempts (suggesting caching or cleanup)
- Trigger: More severe after Ctrl+C interruption during errors
Additional Issues Identified
Auto-updater Installation Detection
Separate from the freeze issue, auto-updater repeatedly fails to detect npm installation:
- Shows "Installation type: unknown" in loop
- Falls back to config repeatedly
- This happens after session loading completes
Suggested Investigation Areas
CRITICAL - System-level state corruption:
- Persistent configuration corruption: What system-level config/registry entries survive reinstalls?
- Windows user profile corruption: Check for Claude Code entries in user profile that persist
- Auto-updater config persistence: Investigate auto-updater configuration storage outside Claude directory
- Signal handling state: How Ctrl+C during errors corrupts persistent system state
- npm global cache corruption: Check if npm global installation cache stores corrupted state
- Windows registry entries: Look for Claude Code registry entries that survive reinstalls
- User environment variables: Check for persistent environment variable corruption
Workaround
- For
--resume: Wait through the freeze - it eventually becomes responsive - For
--continue: Useclaude --resumeand manually select the most recent session
Labels Suggestion
bugcriticalwindowssystem-corruptionnpm-installationhas-repropersistent-state
---
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This issue has 14 comments on GitHub. Read the full discussion on GitHub ↗