[BUG] Shell snapshot creation causes 30-90 second delay per Bash command on Windows, only PC reboot helps
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Every Bash command in Claude Code takes 30-90 seconds to execute on Windows due to shell snapshot creation timing out with SIGTERM.
The same command runs instantly outside Claude Code:
bash -l -c "which python3"in CMD: 2 seconds- Same command in Claude Code: 60+ seconds
Debug logs show the shell snapshot creation starts, times out after 10 seconds with SIGTERM, then the command finally executes after massive delay.
Critical finding:
- PC reboot fixes the issue temporarily (fast operation for hours)
- Killing ALL node/claude processes and restarting Claude Code does NOT help
- Opening new terminal sessions doesn't help
- The setting
shellSnapshotEnabled: falsein settings.json has no effect - Issue occurs on multiple Windows systems with different configurations (with/without Surfshark, with/without WSL)
This suggests something at the Windows OS level accumulates over time that only a full reboot clears.
What Should Happen?
Bash commands should execute within 1-2 seconds, matching the performance of running the same command directly in a terminal.
Ideally, there should be an official setting to completely disable shell snapshots for Windows users experiencing this issue.
Error Messages/Logs
2026-01-20T22:22:42.419Z [DEBUG] Creating shell snapshot for bash (C:\Users\[USERNAME]\AppData\Local\Programs\Git\bin\bash.exe)
2026-01-20T22:22:42.420Z [DEBUG] Looking for shell config file: C:\Users\[USERNAME]\.bashrc
2026-01-20T22:22:44.128Z [DEBUG] Creating snapshot at: C:\Users\[USERNAME]\.claude\shell-snapshots\snapshot-bash-1768947762421-pyadjy.sh
2026-01-20T22:22:54.465Z [DEBUG] Shell snapshot creation failed: Command failed
2026-01-20T22:22:54.466Z [DEBUG] - Error signal: SIGTERM
2026-01-20T22:22:54.466Z [DEBUG] - Error killed: true
2026-01-20T22:24:03.174Z [DEBUG] Getting matching hook commands for PostToolUseFailure with query: Bash
Timeline: 22:22:36 (command requested) → 22:24:03 (finally completed) = ~90 seconds for a simple command
Steps to Reproduce
- Install Claude Code on Windows via npm
- Use Claude Code normally for several hours
- Run any Bash command (e.g.,
echo "Hello World" > test.txt) - Observe 30-90 second delay before execution starts
- Kill all node.exe and claude.exe processes
- Restart Claude Code
- Run the same Bash command - still slow (this is the key observation)
- Reboot PC
- Run the same Bash command - now fast again
- After several hours of use, slowdown returns
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.12 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment details:
- Windows 10/11 (tested on multiple systems)
- Claude Code CLI (not VS Code extension)
- Git Bash: C:\Users\[USERNAME]\AppData\Local\Programs\Git\bin\bash.exe
- Node.js installed via nvm or direct installer
- .bashrc is minimal (only PATH exports)
What does NOT help:
- Clearing shell-snapshots folder
- Setting
shellSnapshotEnabled: falsein settings.json - Killing all node/claude processes
- Logging out and back in
- Opening new terminal windows
What DOES help:
- Full PC reboot (provides hours of fast operation)
Related issues:
- #15756 (Native UI mode hangs on shell snapshot creation)
- #11143 (Shell snapshot files interfering with PowerShell)
- #11201 (Segmentation fault during shell snapshot creation)
Suggested fix:
Add an official, working setting to completely bypass shell snapshot creation on Windows CLI.
Created with Claude OPUS 4.5
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗