Bash tool returns exit code 127 on every command in 2.1.147

Status Fixed / completed
Reported on v2.1.147
Maintainer reply ✓ Yes — chrislloyd
Activity 10 comments · opened May 21, 2026 · closed May 22, 2026
💡 Likely answer: A maintainer (chrislloyd, collaborator) responded on this thread — see the highlighted reply below.

Summary

In Claude Code 2.1.147, every Bash tool invocation fails with exit code 127, including shell builtins. This makes the Bash tool completely unusable.

Repro

Any Bash tool call fails, e.g.:

  • echo "hello" → exit 127
  • pwd && whoami → exit 127
  • /bin/pwd (absolute path to a real binary) → exit 127

Exit 127 normally means "command not found," but it's firing even for builtins and absolute paths to existing binaries, so it looks like the issue is upstream of the user's shell (the tool wrapper itself, not .bashrc/.zshrc).

Environment

  • Claude Code version: 2.1.147
  • OS: Linux 6.18.7-76061807-generic (Pop!_OS / Ubuntu-family)
  • Shell: bash

Related

  • In-app feedback ID: 47de7b0a-a686-4957-aadc-83f44758787d

View original on GitHub ↗

10 Comments

github-actions[bot] · 3 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/52983

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jucor · 3 months ago

Same problem here on

  • Claude Code version: 2.1.147
  • OS: macOS 15.7.1
  • Shell: bash
PauloAK · 3 months ago

Same problem here, was working fine and after a PC reboot it started showing that 127 code for every bash tool usage now.
Tried restarting WSL/Claude code but no success.

  • Claude Code version: 2.1.147
  • OS: Windows 11 - but running inside WSL2 (Ubuntu)
  • Shell: bash
yijingl-nvidia · 3 months ago

Hitting the same thing on 2.1.147 — every Bash tool call comes back with exit code 127, Pinning to 2.1.145 restores normal behavior, so it looks like a regression introduced in 2.1.147.

  • OS: Ubuntu 24.04 (Linux 6.14.0-1018-aws)
  • Arch: aarch64
  • Shell: GNU bash 5.2.21
  • Node: v24.15.0
PauloAK · 3 months ago

I reverted to version 2.1.146 and is working again, so yeah, seems to be a regression introduced on 2.1.147 indeed!

chrislloyd collaborator · 3 months ago

Thanks for the reports (and the feedback id) investigating now.

chrislloyd collaborator · 3 months ago

Confirmed and root-caused issue. Downgrading to 2.1.146 is the immediate workaround. Cutting a hotfix now.

trevor-mytra · 3 months ago
Cutting a hotfix now.

Still not seeing a new version beyond 2.1.147, but the change logs have been updated?

claude[bot] contributor · 3 months ago

This issue was fixed as of version 2.1.148.

github-actions[bot] · 1 month 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.