[BUG] Title: Bash tool: third-party CLI binaries silently fail (exit 1, no output) even with dangerouslyDisableSandbox: true

Status Fixed / completed
Reported on v2.1.80
Maintainer reply None cached
Activity 4 comments · opened Mar 20, 2026 · closed Mar 20, 2026

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?

When Claude Code's Bash tool executes certain third-party CLI binaries, they fail silently with exit code 1 and no output — even when dangerouslyDisableSandbox: true is set. The same binaries work perfectly in the user's terminal.

Environment:

  • OS: Fedora Linux 6.19.8-200.fc43.x86_64
  • Shell: bash
  • Claude Code version: (doplň claude --version)
  • Affected binary: glab 1.89.0 (/usr/bin/glab)

Steps to reproduce:

  1. Install glab (GitLab CLI) — e.g. sudo dnf install glab
  2. Verify it works: glab --version → prints glab 1.89.0 ()
  3. Ask Claude Code to run: glab --version
  4. Bash tool returns exit code 1, empty output

Expected behavior:

glab --version executes and returns glab 1.89.0 () — same as in the terminal.

Actual behavior:

Exit code 1
(no output, no stderr)

Additional notes:

  • git (same permissions, same location /usr/bin/) works correctly via Bash tool
  • ldd /usr/bin/glab shows no missing libraries
  • Adding Bash(glab:*) to permissions.allow in settings.json did not help
  • Using dangerouslyDisableSandbox: true in the tool call did not help
  • The issue appears to affect other third-party binaries as well (not just glab)

Thank you

Kamil

What Should Happen?

All commands which are working in bash (have correct PATH etc) should work in claude-code.

Error Messages/Logs

● Bash(which glab && /usr/bin/glab pipeline list 2>&1 | head -10)
  ⎿  Error: Exit code 1

● Bash(which glab 2>&1; ls -la /usr/bin/glab 2>&1; glab --version 2>&1)
  ⎿  Error: Exit code 1

Steps to Reproduce

run claude in bash inside of some project.

In claude console do git status ie.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.80

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

4 Comments

kkolakow · 6 months ago

● Bash(python3 --version 2>&1)
⎿  Cancelled: parallel tool call Bash(ls /tmp && echo "ls ok") errored

● Bash(node --version 2>&1)
⎿  Cancelled: parallel tool call Bash(ls /tmp && echo "ls ok") errored

● Bash(curl --version 2>&1 | head -1)
⎿  Cancelled: parallel tool call Bash(ls /tmp && echo "ls ok") errored

● Bash(python3 --version 2>&1)
⎿  Error: Exit code 1

● Bash(node --version 2>&1)
⎿  Error: Exit code 1

● Bash(git --version 2>&1)
⎿  Error: Exit code 128

● Moment — teď selháváí i git, který dříve fungoval. Něco se změnilo globálně.

● Bash(git status)
⎿  Error: Exit code 128

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/34876
  2. https://github.com/anthropics/claude-code/issues/29533
  3. https://github.com/anthropics/claude-code/issues/23416

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

kkolakow · 6 months ago

This have nothing with issues you send me. I tried workaround from those issues but doesn't work for me.

This is real NEW issue.

github-actions[bot] · 6 months 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.