[BUG] Shell commands not executing in Claude Code
Environment
- Platform (select one):
- [x] Anthropic API
- Claude CLI version: 1.0.52 (Claude Code)
- Operating System: Fedora 42
- Terminal: /usr/libexec/gnome-terminal-server
Bug Description
● Bash(rm -rf /home/xxx/Projects/xxx) ⎿ Error: /bin/bash: Zeile 1: /home/xxx/.claude/shell-snapshots/snapshot-bash-8bc8c0f6.sh: Datei oder Verzeichnis nicht gefunden
Steps to Reproduce
- Run Claude Code 1.0.51
- Claude Code gets auto updated to 1.0.52
- Ask it to run a shell command
Expected Behavior
Shell command gets executed
Actual Behavior
Above error message gets displayed. Claude sees the error and thinks it made a mistake.
Additional Context
Restarting the program does actually fix the issue.
I ran into a similar issue.
I started getting this error message:
/opt/homebrew/bin/bash: line 1: /Users/atsaloli/.claude/shell-snapshots/snapshot-bash-a86d2d03.sh: No such file or directory
Here is my status:
Claude Code Status v1.0.51
...
System Diagnostics • /doctor
⚠ Config mismatch: running npm-global but config says unknown
...
Model • /model
L Default (claude-sonnet-4-20250514)
This is very disruptive because I have to start a new session and I will lose all the context I've built up over the past 1-2 days.
I'm running Claude Code on macOS.
I've got a few snapshot files:
$ ls /Users/atsaloli/.claude/shell-snapshots
snapshot-bash-1752602689429-9c4quv.sh
snapshot-bash-1752607583038-trn39w.sh
snapshot-bash-1752614596408-msimgr.sh
$
They have the same checksum, so I just copied one of them to the filename Claude Code was complaining about, and now Claude Code can run bash commands again:
cp snapshot-bash-1752602689429-9c4quv.sh snapshot-bash-a86d2d03.sh
@aleksey-perplexity said:
This is very disruptive because I have to start a new session and I will lose all the context I've built up over the past 1-2 days.
You can always do claude --continue or claude --resume to resume your session. It's being persisted.
Hi everyone, I'm really sorry for this trouble. It seems we found the limit of our lockfile implementation 😅
We switched to an in-memory implementation of the snapshot in 1.0.54. If you need to see it for debugging purposes, claude will write to a file when you run with --debug
Please let us know if you have any more trouble!
sorry, we had to revert 1.0.54 due to an issue with the in-memory implementation. we are working on this and will try again tomorrow
Ok 1.0.55 is out with the fix. Please let us know how it goes for you.
1.0.56 is the version with the comprehensive fix. please update and report any new issues. thanks for your patience with this one
There is still a problem here, see: https://github.com/anthropics/claude-code/issues/3580#issuecomment-3095956399
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.