Skip to content

[BUG] Bash Commands do not execute, Return No Output #41722

Description

@djbyrne17

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

All bash commands executed through the Bash tool return (Bash completed with no output) regardless of the command. This affects even the simplest commands like echo, pwd, and ls.

What Should Happen?

Bash commands should return their standard output, for example:

  • echo "test" should return: test
  • pwd should return the current working directory path
  • ls should return directory contents

Error Messages/Logs

`(Bash completed with no output)`

Steps to Reproduce

  1. Start Claude Code session
  2. Ask Claude to run any bash command, for example:
    • echo "test"
    • pwd
    • ls
    • which bash
  3. Observe result: (Bash completed with no output)

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.81 (Claude Code) stable channel, confirmed up to date as of 2026-03-31

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Additional Observations

  • Other tools work normally:

    • Read tool ✓
    • Write tool ✓
    • Glob tool ✓
    • Grep tool ✓
  • Issue is consistent:

    • Occurs across multiple environments (Docker and native macOS)
    • Persists across sessions
    • Affects ALL bash commands without exception
  • User's terminal works normally:

    • User can run bash commands directly in terminal successfully
    • Issue is isolated to Claude Code's bash execution/capture
  • No obvious configuration issues:

    • Checked ~/.claude/settings.json - no bash-specific redirections
    • No unusual environment variables that would suppress output

Impact

  • Severity: Medium-High
  • Users cannot use Claude to run bash commands for diagnostics, system operations, or automation
  • Workaround exists: Ask user to run commands manually, but this defeats the purpose of Claude Code automation

Suggested Investigation Areas

  1. Bash stdout capture mechanism in Claude Code
  2. Pipe/buffer handling for bash subprocess output
  3. TTY/PTY allocation for bash subprocess
  4. Shell initialization or profile loading that might redirect stdout

Configuration Files

Settings from ~/.claude/settings.json:

{
  "apiKeyHelper": "/Users/djbyrne/Desktop/genAI/genai_api/claude_code_apikeyhelper.sh",
  "env": {
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
    "CLAUDE_CODE_API_KEY_HELPER_TTL_MS": "1800000",
    "ENABLE_TOOL_SEARCH": "0",
    "ANTHROPIC_BASE_URL": "https://gov.genai-api.jpl.nasa.gov/sub-id-djbyrne-timecard-govcloud",
    "ANTHROPIC_MODEL": "us-gov.anthropic.claude-sonnet-4-5-20250929-v1:0"
  }
}

Session Information

  • Project: /Users/dj_pastlives/2026_genAI/claude/20260331_pdf_and_plantuml
  • Session occurred: 2026-03-31

Contact

  • User: djbyrne
  • Organization: JPL (Jet Propulsion Laboratory)

Note: This issue was discovered and documented with assistance from Claude during an active debugging session where we attempted to diagnose the problem using non-bash tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api:bedrockIssue relates to AWS Bedrockarea:bashbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions