[BUG] Misleading error: says 'requires a Posix shell' but actually requires bash or zsh

Open 💬 0 comments Opened Jun 27, 2026 by cqexbesd

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/sh present and POSIX-compliant
  • No bash or zsh installed

## Expected behavior

Either:

  1. Accept /bin/sh as a valid shell (it is POSIX-compliant), or
  2. 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

  1. install claude code
  2. don't install bash
  3. 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_

View original on GitHub ↗