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 command analysis: parse cache, stricter declarations and more conservative checks

Claude Code's shell command analysis caches parses, checks declare/export/readonly more strictly and treats fewer commands as simple

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

What

Before Claude Code runs a shell command without asking you, it parses the command to judge whether it is safe. Several parts of that are stricter:

  • Parses are now cached by the command text, together with keyword and quoting states.
  • Declaration commands (declare, typeset, local, export, readonly) get stricter checks. They are flagged as too complex for unknown options, repeated readonly names, local outside a function, and array attributes, with a message that the option is not one bash and zsh are both known to accept. Before, the check was looser.
  • Variable assignments now record whether the value is used later (usesAssignedValue).
  • A new laterLoopPassesDiffer result marks commands as uncertain.
  • The analyzer now tests the parse result's own kind. Before, it tested a different argument. It also stops treating a command as simple when usesAssignedValue or laterLoopPassesDiffer is true.
  • The parse is wrapped in a helper that can fall back. When it does, the check for commands that write settings files runs again in a different mode.

The Bash tool's description also changed. In the capture taken under this release, its longest of three texts is 10,545 characters. A line that said shell state does not persist between commands now says cd carries to the next call only in the main session, if the command succeeds and ends inside the working directories.

Why

More commands, especially those that use declarations, assigned variables or loops, will ask for permission instead of running automatically. Commands that write settings files may be caught more often. Repeated parsing is faster.

See this entry in the whole of v2.1.311 →

Feedback