{"version":"2.1.311","anchor":"shell-discovery-honors-claude-code-shell-and-prefers-the-use","canonical_anchor":"shell-discovery-honors-claude-code-shell-and-prefers-the-use","heading":"Shell detection reworked, CLAUDE_CODE_SHELL validated, login shell reported","tier":"use","area":"Shell","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/shell-discovery-honors-claude-code-shell-and-prefers-the-use","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### Shell detection reworked, CLAUDE_CODE_SHELL validated, login shell reported\n\nClaude Code now builds a list of bash\/zsh candidates, accepts CLAUDE_CODE_SHELL only if it matches, and tells Claude about your login shell\n\n**What**\n\nClaude Code picks a shell (bash or zsh) to run commands in. How it picks, and what it tells Claude, has changed:\n\n- It builds a list of candidates, starting with `CLAUDE_CODE_SHELL` and `SHELL`, but only when their value contains bash or zsh.\n\n- 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.\n\n- 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.\n\n- 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.\n\n**Why**\n\nThe 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.\n\n- Area: Shell\n- Names: `CLAUDE_CODE_SHELL`, `SHELL`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}