Default terminal uses bash instead of user's default shell (zsh)
Resolved 💬 3 comments Opened Feb 27, 2026 by pierrelzw Closed Mar 3, 2026
Description
When Claude Code spawns a terminal/shell, it defaults to bash instead of respecting the user's configured default shell. On macOS, the default shell is zsh, and many users have their environment, PATH, and tool configurations set up in zsh profile files (.zshrc, .zprofile, etc.).
Problem
- Claude Code's Bash tool uses
bashas the default shell - Users whose default shell is
zshfind that CLI tools (e.g.,claudeitself, and other tools installed via Homebrew, nvm, etc.) are not available because the zsh login profile hasn't been sourced - Workaround: explicitly run
/bin/zsh --loginto get a proper environment, but this shouldn't be necessary
Expected Behavior
Claude Code should detect and use the user's default shell (e.g., via $SHELL environment variable or dscl on macOS), or at minimum source the appropriate shell profile so that the user's PATH and tool configurations are available.
Environment
- macOS (Darwin)
- Default shell: zsh
- Claude Code Bash tool defaults to bash
Workaround
Prefix commands with /bin/zsh --login -c '...' or run /bin/zsh --login first.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗