[BUG] Misleading error: says 'requires a Posix shell' but actually requires bash or zsh
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?
Description
On FreeBSD with /bin/tcsh as the default shell and /bin/sh available
(but no bash or zsh installed), the Bash tool fails with:
````
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.
/bin/sh is the canonical POSIX shell and is present on the system, but
Claude Code doesn't accept it. Installing bash via pkg install bash
resolves the issue.
The error message should say it requires bash or zsh specifically,
rather than claiming it needs "a Posix shell" — since it rejects the
actual POSIX shell (/bin/sh).
## Environment
- FreeBSD 15.1-RELEASE
- Default shell:
/bin/tcsh /bin/shpresent and POSIX-compliant- No bash or zsh installed
## Expected behavior
Either:
- Accept
/bin/shas a valid shell (it is POSIX-compliant), or - Update the error message to say "requires bash or zsh"
🤖 Generated with Claude Code
What Should Happen?
Claude should use /bin/sh if it needs a POSIX shell, or ask for bash if it needs that. Or just use tcsh in my case as its available - though of course it would need different syntax.
Error Messages/Logs
Steps to Reproduce
- install claude code
- don't install bash
- trigger claude to run a shell command
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.89 (Claude Code)
Platform
Anthropic API
Operating System
Other
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_