Follow Discord
Sweep 30 Oct 2026 · 01:02Z Build v2.1.314 532 read Stable v2.1.308 Latest v2.1.314 Next v2.1.314 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.314 ·

Shell commands now clear any which or unsetenv override before running

Before each shell command, Claude Code removes any alias or function named unsetenv, and, behind a switch, one named which

You'll notice Improvements
JSON All of v2.1.314
You'll noticeTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Bash ToolArea: what it touches
ImprovementsKind: in v2.1.314,
ImprovementsSection of the release
What

Before Claude Code runs a shell command, it puts a short setup step in front of it, called a prefix. That prefix now removes any alias or shell function named unsetenv, so the standard command is used instead. An alias or shell function is a user-defined shortcut that replaces a command. A matching step for which is also added, but only when a server-controlled switch is turned on.

Claude Code also now recognises the environment variables bash uses to hand such functions from one shell to the next: BASH_FUNC_which%% and BASH_FUNC_unsetenv%%, plus their () and __BASH_FUNC<...>() forms. The parts of the prefix are now joined into one chain. If you set a wrapper with CLAUDE_CODE_SHELL_PREFIX, it is still applied around the whole chain.

Why

If your shell setup defines its own which or unsetenv, those versions could change how Claude Code's shell setup behaves. Clearing them first means Claude Code works with the standard commands. The which step depends on a switch, so the part that always applies is the unsetenv cleanup.

See this entry in the whole of v2.1.314 →

Feedback