[BUG] Bash tool: exit 126 with "permission denied: /proc/self/fd/3" on Fedora 43 + zsh, blocks git writes, `ls -la`, `gh`
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?
Summary
On Fedora Linux 43 with zsh as the default shell, Claude Code's Bash tool
returns exit code 126 for a reproducible subset of commands, including
git checkout, git push, gh pr create, ls -la <pattern>, and find.
Simpler commands in the same session (pwd, git status, grep, Read/Edit
tool file operations) work normally. The error surfaces in the harness as:
Exit code 126
[Request interrupted by user for tool use]
— but the user did not interrupt. A previous CC session on this machine
surfaced the underlying error: zsh:4: permission denied: /proc/self/fd/3,
indicating zsh's shell init is failing on a specific file-descriptor access
inside whatever sandbox CC spawns the shell under.
Restarting the Claude Code tab (as suggested by CC docs for CLI failures)
does not resolve this. Subagents dispatched via the Agent tool
(git-master, coder, finder) hit the identical failure — the block is
at the harness/sandbox boundary, not the CLI.
## Environment
- Claude Code version: <paste
claude --versionoutput> - OS: <paste
/etc/os-releaseNAME + VERSION> - Kernel: Linux 6.19.12-200.fc43.x86_64
- Shell: zsh (
<paste $SHELL + zsh --version>) - Model: claude-opus-4-7 (1M context)
- Project has a PreToolUse Bash hook (
.claude/hooks/guard-bash.sh) —
confirmed narrow (only blocks inline-secret patterns), not the cause.
## Works vs. doesn't
Works in the same session:
pwdgit status --short | head -20git log --oneline -3git branch --show-current && git stash list | head -5grep -n -E 'pattern' path/to/file.toml- All Read / Edit / Write tool operations
Fails with exit 126:
ls -la <glob-with-dotfiles>find . -maxdepth 2 -name '.env*'git checkout -b new/branchgit push origin branchgh pr create .../usr/bin/git checkout -b new/branch(absolute path — same failure)
What Should Happen?
Expected
Bash tool executes the command in a shell environment that zsh can
initialize successfully, or falls back to bash / sh if the user shell
fails to init. Exit code should reflect the actual command exit, not a
shell-init failure disguised as a user interrupt.
Error Messages/Logs
Steps to Reproduce
## Reproduction
cdinto a git repository on Fedora 43 with zsh as the user shell.- Ask Claude Code to run
git checkout -b any/branch-namevia the Bash
tool.
- Observe exit code 126 with "Request interrupted by user for tool use"
even when the user does nothing.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.117 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
❯ claude --version
2.1.117 (Claude Code)
~
❯ cat /etc/os-release | head -4
NAME="Fedora Linux"
VERSION="43 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
~
❯ echo $SHELL && zsh --version
/usr/bin/zsh
zsh 5.9 (x86_64-redhat-linux-gnu)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗