Terminal freezes on Windows - shell-snapshots causing input lock
Resolved 💬 3 comments Opened Nov 5, 2025 by ghost Closed Nov 9, 2025
Description
Claude Code terminal becomes unresponsive (cannot input text) when launching new sessions on Windows. The issue appears to be caused by corrupted or accumulating files in .claude/shell-snapshots/.
Environment
- OS: Windows (win32)
- Shell: Git Bash (via Windows Terminal)
- Claude Code Version: Latest
- Platform: win32
Steps to Reproduce
- Launch Claude Code with
claudecommand - Work in a session normally
- Exit session and open a new terminal
- Launch
claudeagain - Terminal loads but input is frozen - cannot type anything
Observed Behavior
- Claude Code appears to load successfully
- Prompt is visible
- Cursor may or may not be visible
- Input is completely frozen - cannot type any text
- Shell-snapshots directory accumulates files (30+ files observed)
- Files have names like
snapshot-bash-1762374234817-dltnwz.sh
Investigation Findings
When running PowerShell commands via Claude Code's Bash tool, errors indicate shell-snapshot corruption:
/c/Users/kjfle/.claude/shell-snapshots/snapshot-bash-1762374234817-dltnwz.sh.ProcessName : The term
'/c/Users/kjfle/.claude/shell-snapshots/snapshot-bash-1762374234817-dltnwz.sh.ProcessName' is not recognized...
Temporary Workaround
# In regular PowerShell (not Claude Code):
Remove-Item -Path "$env:USERPROFILE\.claude\shell-snapshots" -Recurse -Force
This fixes the issue temporarily, but shell-snapshots rebuild and cause the freeze again within minutes/hours.
Attempted Permanent Fixes
- Disabling sandbox: Changed
"enabled": trueto"enabled": falsein~/.claude/settings.json - Switching to PowerShell: May help, but Git Bash should be supported
- Clearing snapshots regularly: Not sustainable
Expected Behavior
- New Claude Code sessions should start without input freeze
- Shell-snapshots should either:
- Not accumulate corrupted files
- Auto-cleanup old snapshots
- Not interfere with terminal input
Frequency
- Happens consistently after every 1-2 session cycles
- 100% reproducible once snapshots accumulate
Impact
- Critical - Makes Claude Code unusable without manual intervention
- Requires exiting to regular terminal to clear snapshots
- Disrupts workflow significantly
Suggested Fixes
- Add automatic cleanup of old shell-snapshots
- Fix snapshot corruption on Windows/Git Bash
- Add setting to disable shell-snapshots if not needed
- Better error handling when snapshots are corrupted
Additional Context
User has session-manager hooks configured but issue occurs regardless of hooks.
---
Reported via: claude-code session
User Impact: High - blocking regular usage
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗