Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.318 Next v2.1.319 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 bundleSHELL
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up SHELL, on Claude Code changelog. * Fixed bash scripts started from the Bash tool stopping after their first command when `SHELLOPTS` is exported changelog see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up SHELL, on Claude Code changelog.

See this entry in the whole of v2.1.311 →

Feedback