[BUG] a POSIX shell is required, but bash is invoked instead
Resolved 💬 7 comments Opened Sep 16, 2025 by WhyNotHugo Closed Jan 11, 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?
Claude indicates that it requires a POSIX shell, but it then tries to explicitly use bash instead.
This fails when there is a POSIX shell installed, but bash is not installed.
Even if SHELL=/bin/sh is defined, claude still attempts to use bash instead.
What Should Happen?
/bin/sh should be used. $SHELL should be invoked directly, not through bash.
Error Messages/Logs
● Bash(cargo check)
⎿ Error: No suitable shell found. Claude CLI requires a Posix shell environment. Please ensure you have a valid
shell installed and the SHELL environment variable set.
● Let me try with shell explicitly set to sh:
● Bash(SHELL=/bin/sh cargo check)
⎿ Running…
Steps to Reproduce
Run any command without installing bash first.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.115 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗