You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⏺ Bash(npm test client-server)
⎿ Error: zsh:source:1: no such file or directory: /var/folders/qc/hn57tpxs7tg5842pdqg075vc0000gn/T/claude-shell-snapshot-c1b9
⏺ Bash(npm test client-server)
⎿ Error: zsh:source:1: no such file or directory: /var/folders/qc/hn57tpxs7tg5842pdqg075vc0000gn/T/claude-shell-snapshot-c1b9
⏺ Bash(npm test client-server)
⎿ Error: zsh:source:1: no such file or directory: /var/folders/qc/hn57tpxs7tg5842pdqg075vc0000gn/T/claude-shell-snapshot-c1b9
⏺ Bash(npm test client-server)
⎿ Error: zsh:source:1: no such file or directory: /var/folders/qc/hn57tpxs7tg5842pdqg075vc0000gn/T/claude-shell-snapshot-c1b9
Actual Behavior
Claude was no longer able to execute any shell commands, every shell command attempted produce the "no such file or directory.
Additional Context
I did have 104GB free on my drive. I suspect there is some cleanup operation, and it seems unlikely to be a macOS one from my naive understanding, but I really know nothing about this.
In my case there was a less than 30 minute, perhaps 5 minute (just guessing based on memory) delay between when the shell was working and when it stopped working. It was all within one prompt response from Claude. It was working when Claude first started responding and part way through the response its "shell" broke.
The .jsonl log I attached might confirm this? I don't know what all is included in those logs, or if there is a different one I should attach.
I'm experiencing the same issue. For me, it happens even in fresh sessions and is often so persistent that opening new sessions doesn't resolve it.
Details
I initially suspected it was due to working with multiple Claude Code sessions simultaneously (using git worktrees), but testing after killing all Claude processes showed this wasn't the cause. I also found stale processes in Activity Monitor after closing sessions, but killing them didn't help either.
Honestly, this happens more often than not for me.
The only reason I'm still using Claude Code is my recent Max plan subscription - Cursor seems more expensive currently, but that might change.
I also suspected it might be related to using ZSH with oh-my-zsh (saw someone mention this), but it occurs in bash too.
Actually, I didn't know how to switch to bash in my particular scenario.
Solution
I created a completely separate, streamlined environment specifically for Claude Code:
Uses bash instead of zsh
No Homebrew or mise contamination
Only direct installations of required tools (Node.js, etc.)
Force Claude Code to run through bash with export SHELL=/bin/bash
It's not ideal, but it works reliably, and I'll keep it this way until this gets resolved in Claude Code.
It worked for a while, but since one of the latest updates (maybe 1.0.38), it doesn't work even with the fix (#2139 (comment)).
Sometimes it runs a command, but after a few commands, it stops working. Or sometimes doesn't work at all. Only restarting helps, but that's far from ideal for any longer work.
● Bash(ls -la)
⎿ Error: /bin/bash: line 1: /home/user/.claude/shell-snapshots/snapshot-bash-1753059559185-swhw51.sh: No such file or directory
Which make claude code unusable. In two vscode window, one worked 6 hours ago for ~4 hours and then started bugging, while that happened I opened another instance of vscode for another folder and the problem got even worst. Pretty much all command it tries to run fails.
@wolffiex Hmm, my bad - this will need investigating on my side.
I think I found the culprit: claude-swarm. I didn't realise it happens only while using it. I'll keep my eyes open today and report back here if I notice the same behaviour with claude directly.
● Now I'll run the Rust type checker using cargo check in the src-tauri directory,
which is the standard way to typecheck Rust code:
[DEBUG] executePreToolHooks called for tool: Bash
[DEBUG] Executing hooks for PreToolUse:Bash
[DEBUG] Getting matching hook commands for PreToolUse with query: Bash
[DEBUG] Found 0 hook matchers in settings
[DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
[DEBUG] Found 0 hook commands to execute
[DEBUG] Getting matching hook commands for Notification with query: undefined
[DEBUG] Found 0 hook matchers in settings
[DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
[DEBUG] Bash tool invoked with command: cd src-tauri && cargo check
[DEBUG] Bash tool description: Run Rust type checker on all source files
[DEBUG] AutoUpdaterWrapper: Installation type: npm-local, using native: false
● Bash(cd src-tauri && cargo check)
⎿ Error: /bin/bash: line 1:
/home/user/.claude/shell-snapshots/snapshot-bash-1753148921648-xe43fp.sh: No
such file or directory
[DEBUG] Stream started - received first chunk
● Let me try a different approach:
[DEBUG] executePreToolHooks called for tool: Bash
[DEBUG] Executing hooks for PreToolUse:Bash
[DEBUG] Getting matching hook commands for PreToolUse with query: Bash
[DEBUG] Found 0 hook matchers in settings
[DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
[DEBUG] Found 0 hook commands to execute
[DEBUG] Writing to temp file: /run/media/user/project/.claude/settings.local.json.tmp.3357173.1753181211124
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 224 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /run/media/user/project/.claude/settings.local.json.tmp.3357173.1753181211124 to /run/media/user/project/.claude/settings.local.json
[DEBUG] File /run/media/user/project/.claude/settings.local.json written atomically
[DEBUG] Bash tool invoked with command: cd /run/media/user/project/src-tauri && cargo check
[DEBUG] Bash tool description: Run Rust type checker on all source files
[DEBUG] AutoUpdaterWrapper: Installation type: npm-local, using native: false
● Bash(cd /run/media/user/project/sr
c-tauri && cargo check)
⎿ Error: /bin/bash: line 1:
/home/user/.claude/shell-snapshots/snapshot-bash-1753148921648-xe43fp.sh: No
such file or directory
[DEBUG] Stream started - received first chunk
● Let me check the current directory and run cargo check directly:
[DEBUG] executePreToolHooks called for tool: Bash
[DEBUG] Executing hooks for PreToolUse:Bash
[DEBUG] Getting matching hook commands for PreToolUse with query: Bash
[DEBUG] Found 0 hook matchers in settings
[DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
[DEBUG] Found 0 hook commands to execute
[DEBUG] Writing to temp file: /run/media/user/project/.claude/settings.local.json.tmp.3357173.1753181218204
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 244 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /run/media/user/project/.claude/settings.local.json.tmp.3357173.1753181218204 to /run/media/user/project/.claude/settings.local.json
[DEBUG] File /run/media/user/project/.claude/settings.local.json written atomically
[DEBUG] Bash tool invoked with command: pwd && ls -la
[DEBUG] Bash tool description: Check current directory and list files
[DEBUG] AutoUpdaterWrapper: Installation type: npm-local, using native: false
● Bash(pwd && ls -la)
⎿ Error: /bin/bash: line 1:
/home/user/.claude/shell-snapshots/snapshot-bash-1753148921648-xe43fp.sh: No
such file or directory
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.
Activity
elyase commentedon Jun 16, 2025
I've noticed the same thing. It seems to happen when you return to an old session. Restarting the session fixes it.
derekbreden commentedon Jun 16, 2025
Interesting.
In my case there was a less than 30 minute, perhaps 5 minute (just guessing based on memory) delay between when the shell was working and when it stopped working. It was all within one prompt response from Claude. It was working when Claude first started responding and part way through the response its "shell" broke.
The .jsonl log I attached might confirm this? I don't know what all is included in those logs, or if there is a different one I should attach.
[-][BUG][/-][+][BUG] Claude stops with snapshot error[/+]almirsarajcic commentedon Jun 22, 2025
I'm experiencing the same issue. For me, it happens even in fresh sessions and is often so persistent that opening new sessions doesn't resolve it.
Details
I initially suspected it was due to working with multiple Claude Code sessions simultaneously (using git worktrees), but testing after killing all Claude processes showed this wasn't the cause. I also found stale processes in Activity Monitor after closing sessions, but killing them didn't help either.
Honestly, this happens more often than not for me.
The only reason I'm still using Claude Code is my recent Max plan subscription - Cursor seems more expensive currently, but that might change.
I also suspected it might be related to using ZSH with oh-my-zsh (saw someone mention this), but it occurs in bash too.
Actually, I didn't know how to switch to bash in my particular scenario.
Solution
I created a completely separate, streamlined environment specifically for Claude Code:
It's not ideal, but it works reliably, and I'll keep it this way until this gets resolved in Claude Code.
markng commentedon Jun 25, 2025
Also suffering this issue when claude code shells are left idle.
amiperl commentedon Jun 26, 2025
Feels good to know I'm not alone. If I restart the terminal window and Claude code, does it still have access to the prior session context?
almirsarajcic commentedon Jun 26, 2025
You can use
/resumecommand to continue one of the previous sessions.There's even
-cflag (claude -c) to resume the very last one.almirsarajcic commentedon Jul 3, 2025
It worked for a while, but since one of the latest updates (maybe 1.0.38), it doesn't work even with the fix (#2139 (comment)).
Sometimes it runs a command, but after a few commands, it stops working. Or sometimes doesn't work at all. Only restarting helps, but that's far from ideal for any longer work.
PastaPastaPasta commentedon Jul 6, 2025
I can confirm I run into this error. It appears to only happen when CC is updated in the background, and your active session is using an old version.
25 remaining items
germanoeich commentedon Jul 16, 2025
Can confirm that this started happening to me in 1.0.53 pretty often. @wolffiex Can you consider re-opening this issue?
mweichert commentedon Jul 16, 2025
wahve3 commentedon Jul 17, 2025
Downgrading to 1.0.51 worked for me as well. Don't forget to disable auto-update when doing this!
Extarys commentedon Jul 21, 2025
Thanks ! 1.0.51 works for me too ! I didnt use claude for a week and started having this issue today... running 1.0.56.
FYI: Disable autoupdate:
claude config set -g autoUpdates disabledThis should not be marked as closed @wolffiex :)
EDIT: Well, it worked for 5 minutes and then:
Which make claude code unusable. In two vscode window, one worked 6 hours ago for ~4 hours and then started bugging, while that happened I opened another instance of vscode for another folder and the problem got even worst. Pretty much all command it tries to run fails.
wolffiex commentedon Jul 21, 2025
@Extarys can you please paste the error? Can you run with -d and paste the output?
Extarys commentedon Jul 21, 2025
@wolffiex Hmm, my bad - this will need investigating on my side.
I think I found the culprit: claude-swarm. I didn't realise it happens only while using it. I'll keep my eyes open today and report back here if I notice the same behaviour with
claudedirectly.https://github.com/parruda/claude-swarm/issues/93
Extarys commentedon Jul 22, 2025
Yes, finally :)
megalithic commentedon Nov 6, 2025
Any traction on this? It is a constant (bigger than a) paper cut for me and others.
github-actions commentedon Dec 12, 2025
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
github-actions commentedon Jan 12, 2026
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
github-actions commentedon Jan 19, 2026
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.