Bash Tool: No Output or File Creation Possible

Resolved 💬 3 comments Opened Dec 14, 2025 by danome Closed Dec 14, 2025

Bug Description

Bash Tool Not Returning Output or Creating Files

Environment

  • OS: Linux 6.14.0-33-generic
  • Platform: linux
  • Claude Code Version: [Please add your version]
  • Date: 2025-12-14

Issue Description

The Bash tool is not functioning correctly - commands appear to execute successfully but produce no output and file operations have no effect.

Expected Behavior

  • Bash commands should return their output
  • File creation commands should create files
  • Echo and print commands should display output

Actual Behavior

  • All commands return exit code 0 (success)
  • No output is captured or displayed
  • File operations (creating, writing) have no effect
  • Both foreground and background execution are affected

Steps to Reproduce

  1. Execute any simple bash command:
# Using Bash tool
Bash(command="echo 'Hello World'")
# Result: <system>Tool ran without output or errors</system>
  1. Try to create a file:
Bash(command="echo 'test' > /path/to/file.txt")
# Result: <system>Tool ran without output or errors</system>
# File is not created
  1. Even with background execution:
Bash(command="pwd", run_in_background=True)
# Result: Command completes with exit code 0
# But BashOutput returns no stdout/stderr

Diagnostic Tests Performed

| Command | Expected | Actual |
|---------|----------|---------|
| echo "Hello World" | "Hello World" output | No output |
| pwd | Current directory path | No output |
| ls -la | Directory listing | No output |
| date | Current date/time | Command times out or no output |
| echo "test" > file.txt | File created | No file created |
| pwd > output.txt | Output file created | No file created |

Background Execution Test

# Background execution
Bash(command="sleep 1 && echo 'Done'", run_in_background=True)
# Result: Exit code 0, but no output captured

Additional Context

  • The LS, Read, Write, and other tools work correctly
  • Only the Bash tool is affected
  • Commands report successful completion (exit code 0) but have no observable effect
  • Attempted with various timeout values (1000ms, 5000ms)
  • Tried output redirection (2>&1) with no success

Impact

This prevents:

  • Running git commands for repository management
  • Executing build scripts
  • Running shell-based tests
  • Any shell-based automation

Workaround

Currently must use system terminal outside of Claude Code for all shell operations.

System Information

Working directory: /home/danome/development/ttn
Is directory a git repo: No

Test Case for Verification

A simple test to verify the issue:

# This should output "Hello" but doesn't
result = Bash(command="echo Hello")
assert "Hello" in result  # This will fail

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 1.0.72
  • Feedback ID: 8279f99b-d12e-4e67-9761-8fa90664e439

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at NX (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:1858:1184)\n    at file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:1858:912\n    at Array.map (<anonymous>)\n    at LX (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:1858:903)\n    at SjB (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:2218:5231)\n    at $R (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:19859)\n    at yb (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:42848)\n    at Sb (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38369)\n    at Ij (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38297)\n    at gR (file:///home/danome/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38151)","timestamp":"2025-12-14T20:36:30.777Z"}]

View original on GitHub ↗

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