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 ·

Bash tool instructions now spell out when cd carries over

Claude's Bash tool instructions now say cd carries to the next command only in the main session, after success, inside the working directories

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

What

The Bash tool lets Claude run shell commands. Its description, the instructions Claude reads about the tool, has a rewritten line about the working directory. The line is now built by the program instead of being fixed text. The rewrite was captured under this release and appears in the agent-claude, compaction, command-init and command-security-review prompts.

  • cd carries to the next call only in the main session, if the command succeeds and ends inside the working directories.
  • Outside them the shell returns to the start folder; otherwise it stays where it was.
  • Shell state does not persist. The shell environment is initialized from the user's profile (bash or zsh).

The old line said only that the working directory persists between calls, that absolute paths are preferred, and that cd in a compound command can trigger a permission prompt.

Why

Claude now has an exact rule for when a change of folder sticks. In subagents, which are helper agents Claude starts for a task, after a failed command, or after leaving your project folders, the next command starts from the original folder.

See this entry in the whole of v2.1.311 →

Feedback