Bash tool hangs indefinitely on all commands (even `pwd`) — only resolved by full OS restart, not app restart

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 5, 2026

Environment: macOS, Claude Desktop app, Claude Code CLI v2.1.222

Description:
In a Claude Code session running inside the desktop app, the Bash tool hung indefinitely on every command — including trivial ones like pwd, ls, and echo hello — with zero stdout/stderr output, ever. Every invocation was silently moved to a background task and never completed, even after 30+ second waits on the simplest possible command.

Troubleshooting performed:

  1. Reviewed ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile for anything that could block non-interactively (auto-update prompts, instant-prompt hooks, TTY-dependent logic) — config was clean, no plausible cause found.
  2. Confirmed via a manual terminal test (zsh -c 'echo hi' < /dev/null) that non-interactive zsh with no TTY works fine outside of the app — ruling out shell config entirely.
  3. Discovered the Claude Code CLI was not installed on this machine (desktop app only) — installed it. Hang persisted.
  4. Discovered system Node.js was v12.x (very old, EOL) — updated to current LTS via nvm. Hang persisted.
  5. Fully quit and reopened the desktop app, started a new session. Hang persisted.
  6. Fully restarted the computer. This resolved it — Bash then worked instantly and normally in the same session.

Root cause: Unconfirmed, and there are two competing theories from our own troubleshooting:

  • It may be a stuck/orphaned process or held resource (e.g. a wedged shell-bridge subprocess, exhausted file descriptors, or a stale IPC socket) that only a full OS restart would clear — under this theory, the missing CLI and old Node version were red herrings, since fixing both had no effect before the restart.
  • Alternatively, the restart itself may be a red herring, and the real fix was that a restart was simply required for the OS/shell to pick up the newly-installed CLI and updated Node/npm versions (e.g. PATH or environment caching that a plain app restart doesn't refresh, but a full login/session restart does).

We can't distinguish between these from the client side — flagging both so your team can investigate further.

Impact: Total loss of Bash tool functionality for the duration of the affected session(s) — no error surfaced, so the failure mode was silent and only detectable by noticing every command time out.

Ask: It would help to have the desktop app detect/report a wedged shell-bridge process (rather than hanging silently), and/or clarify whether environment changes (new CLI install, Node/PATH updates) are expected to require a full restart vs. just an app restart to take effect.

cc: @shyam-habarakada

View original on GitHub ↗