[BUG] All Bash tool commands hang indefinitely — no child process is ever spawned (macOS, v2.1.228)
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 tool invocation hangs indefinitely and never returns, including echo "hello". Non-bash tools (Read, Write, Edit, Glob, Grep) work normally. This has persisted since 2026-07-09.
The key finding: no child process is ever created. While a Bash call is hanging, ps -ef shows the claude process with zero children — the shell that would run the command was never spawned. A sample of the hanging process shows the main thread parked in kevent64 for 8206 of 8244 samples, waiting on a notification that never fires. So this is not a slow command or a stuck subprocess; execution never reaches the shell.
Environment
- macOS (Apple Silicon)
- Claude Code v2.1.220 and v2.1.228 (both reproduce)
- Installed via npm global (
/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code), no mixed installation - Reproduces in both the CLI and the Claude desktop app
Steps to Reproduce
- Start
claudein any directory - Ask it to run
echo "hello"withrun_in_backgroundunset - Approve the permission prompt
- The tool never returns
Ruled Out
- PreToolUse hooks — removed all hooks from settings.json, no change
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1in settings.jsonenv— background execution stops, hang remains~/.claude/shell-snapshots— deleted, no change- Desktop-app specificity — CLI reproduces identically
- Version — v2.1.220 and v2.1.228 both reproduce
- Installation —
npm uninstall -gfollowed bynpm install -gdid not help (unlike #41983, where reinstalling resolved it) /doctorruns fine and reports nothing related to Bash
Expected Behavior
Bash commands execute and return output within a reasonable time, or fail with an error.
Additional Notes
Possibly related: #41983, #62115, #62292. A stack sample from the hanging process is available on request.
What Should Happen?
Bash commands execute and return output within a reasonable time, or fail with an explicit error. Even a trivial command like echo "hello" should return in well under a second.
Error Messages/Logs
No error message is produced — the tool simply never returns.
Process state while hanging (`ps -ef | grep claude`), showing zero child processes:
502 77522 77504 0 10:02AM ttys000 0:59.93 claude
Main thread stack from `sample <pid> 10` (8244 samples, 8206 parked in kevent64):
8244 Thread_5664904 DispatchQueue_1: com.apple.main-thread (serial)
+ 8244 start (in dyld) + 6992
+ 8244 ??? (in claude.exe) load address 0x104b34000 + 0xa28354
+ ...
+ ! : 8206 ??? (in claude.exe) load address 0x104b34000 + 0x7f9200
+ ! : | 8206 kevent64 (in libsystem_kernel.dylib) + 8
Steps to Reproduce
- Start Claude Code in any directory:
claude - In the chat, send:
Run this one command with the Bash tool. Do not set run_in_background: echo "hello" - Approve the permission prompt
- The Bash tool never returns. It has to be interrupted with Esc.
To confirm no child process is spawned, run this in a separate terminal while the call is hanging:
ps -ef | grep -i claude | grep -v grep
The claude process appears with no children.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.228
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This has been reproducing continuously since 2026-07-09, across multiple Claude Code versions. It is not intermittent — every Bash call hangs, every time.
Diagnostics performed over two sessions, all of which failed to change the behavior:
- Removed all PreToolUse hooks from
~/.claude/settings.json - Set
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1in the settingsenvblock (background execution stopped; the hang did not) - Deleted
~/.claude/shell-snapshots - Tested both the CLI and the Claude desktop app (identical behavior)
- Tested v2.1.220 and v2.1.228
- Ran
npm uninstall -g @anthropic-ai/claude-codethennpm install -g @anthropic-ai/claude-code - Ran
/doctor, which completed normally and reported nothing related to Bash
Installation is npm global only (/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code); there is no native-installer copy on this machine. The full sample output is available if it would help.