[BUG] Shell commands not executing in Claude Code

Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Activity 8 comments · opened Jul 15, 2025 · closed Jul 17, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator) responded on this thread — see the highlighted reply below.

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

  1. Run Claude Code 1.0.51
  2. Claude Code gets auto updated to 1.0.52
  3. 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.

View original on GitHub ↗

8 Comments

aleksey-perplexity · 1 year ago

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
ChristophRauch · 1 year ago

@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.

wolffiex collaborator · 1 year ago

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!

wolffiex collaborator · 1 year ago

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

wolffiex collaborator · 1 year ago

Ok 1.0.55 is out with the fix. Please let us know how it goes for you.

wolffiex collaborator · 1 year ago

1.0.56 is the version with the comprehensive fix. please update and report any new issues. thanks for your patience with this one

mkbrechtel · 1 year ago
github-actions[bot] · 1 year ago

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.