What probably matters to youSection of the release
What
Claude Code picks a shell (bash or zsh) to run commands in. How it picks, and what it tells Claude, has changed:
It builds a list of candidates, starting with CLAUDE_CODE_SHELL and SHELL, but only when their value contains bash or zsh.
It then tries zsh and bash in /bin, /usr/bin, /usr/local/bin and /opt/homebrew/bin, and puts bash first when SHELL is bash.
The CLAUDE_CODE_SHELL override is no longer tried first on its own. It is accepted only when it equals the detected shell. Otherwise a log message says it is not a valid bash/zsh path and detection is used instead.
The environment details given to Claude now name the detected shell. When SHELL differs from it, they read <shell> (login shell: <SHELL shell>). Before, a fixed fallback was returned.
Why
The shell affects every command Claude runs. If you set CLAUDE_CODE_SHELL, make sure it points to a real bash or zsh path, or it will be ignored. Claude may now be told about two shells.