[BUG] Bash commands fail with exit code 1 and no output

Resolved 💬 2 comments Opened Nov 22, 2025 by jeffrosenberg Closed Nov 22, 2025

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?

The Bash tool doesn't seem to work -- every instance of Claude trying to call Bash results in no output and the generic error "Error: Exit code 1". Platform: Linux (Fedora 43, kernel 6.17.7).

Example output:

● Bash(echo "Hello from Bash")
  ⎿  Error: Exit code 1

● Bash(pwd)
  ⎿  Error: Exit code 1

This happens across multiple types of invocations -- in the VSCode integrated terminal, in my native Konsole terminal, using the VSCode extension, etc. Running !bash commands from within Claude Code fails similarly.

I've tried installing Claude Code natively, then uninstalled and reinstalled using NPM, and finally used claude migrate-installer to switch to a local install. I've tried both enabling and disabling sandbox mode. I've also tried disabling SELinux, as well as specifically enabling all Bash usage in Claude's permissions.

What Should Happen?

Bash commands should return with valid output and exit code 0. For example, Bash(echo "Hello from Bash") should return Hello from Bash and a success error code.

Error Messages/Logs

I see the following in the Claude debug logs, not associated with running the actual Bash commands but with creating shell snapshots:


2025-11-21T23:17:51.955Z [DEBUG] No stdout output captured
2025-11-21T23:17:51.955Z [DEBUG] No stderr output captured
2025-11-21T23:17:51.966Z [ERROR] Error: Error: Failed to create shell snapshot: spawn /usr/bin/env bash ENOENT
    at file:///home/jeff/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1203:133
    at exithandler (node:child_process:424:5)
    at ChildProcess.errorhandler (node:child_process:436:5)
    at ChildProcess.emit (node:events:508:28)
    at ChildProcess.emit (node:domain:489:12)
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)


Trouble running `/usr/bin/env bash` would certainly explain the issue! But that command works just fine in a regular terminal.

Steps to Reproduce

I can reproduce this with any request to Claude to use the Bash tool, but I don't think others will be able to. It seems specific to my environment somehow, although I haven't yet determined how.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.50

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

I'm not clear whether this is a bug in Claude Code on Linux, or just some sort of issue with my local configuration. I'm posting here because after much troubleshooting, I was directed to do so by the Fin support agent:

Since you've completed the standard troubleshooting steps and the debug file isn't accessible here, you can use the /bug command within Claude Code to report this Bash tool issue directly to our team. This will send the relevant technical details including your debug information.

I'm attaching a debug file from a session using claude --debug:
4aab985d-c1e1-4cbf-bac8-59c54218b996.txt

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗