Follow Discord
Sweep 27 Oct 2026 · 19:04Z Build v2.1.312 531 read Stable v2.1.308 Latest v2.1.312 Next v2.1.312 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.311 ·

Shell detection reworked, CLAUDE_CODE_SHELL validated, login shell reported

Claude Code now builds a list of bash/zsh candidates, accepts CLAUDE_CODE_SHELL only if it matches, and tells Claude about your login shell

Group of 3 Use it now Improvements
JSON All of v2.1.311
Use it nowTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
ShellArea: what it touches
ImprovementsKind: in v2.1.311,
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.

Read from
Names in the bundleCLAUDE_CODE_SHELLSHELL

See this entry in the whole of v2.1.311 →

Feedback