Unexpected shell validation failure despite valid $SHELL setting
Resolved 💬 8 comments Opened Mar 12, 2025 by pbozeman Closed Mar 14, 2025
Bug Description
claude complains about not having a valid shell, but $SHELL is set to a working zsh
Environment Info
- Platform: linux
- Terminal: tmux
- Version: 0.2.30
- Feedback ID: 11050e7c-6baa-4cbb-98f2-3ef0532d26d8
❯ echo $SHELL
/nix/store/m7l6yzmflrf9hjs8707lk9nkhi6f73n1-zsh-5.9/bin/zsh
❯ claude
╭────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /home/pbozeman/src/svc-example │
╰────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────╮
│ > │
╰───────────────────────────────────────────────────────────────────────────────────────╯
! for bash mode · / for commands · esc to undo \⏎ for newline
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
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.
at i6.findSuitableShell (file:///nix/store/g2i9z5sij5gsgcly3fcsh9vw20q5ybk2-claude-code-0.2.30/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:8036)
at new i6 (file:///nix/store/g2i9z5sij5gsgcly3fcsh9vw20q5ybk2-claude-code-0.2.30/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:5985)
at i6.getInstance (file:///nix/store/g2i9z5sij5gsgcly3fcsh9vw20q5ybk2-claude-code-0.2.30/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:8426)
at mw (file:///nix/store/g2i9z5sij5gsgcly3fcsh9vw20q5ybk2-claude-code-0.2.30/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:344:1172)
at aH (file:///nix/store/g2i9z5sij5gsgcly3fcsh9vw20q5ybk2-claude-code-0.2.30/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:1162:14518)
at cz1.<anonymous> (file:///nix/store/g2i9z5sij5gsgcly3fcsh9vw20q5ybk2-claude-code-0.This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗