Claude Code v2.1.311 ·
Shell checks look harder at loops, declarations and rm targets
Claude Code's shell checks now analyse for and while loop headers, reject some declarations, and parse rm targets two ways
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
Claude Code analyses shell commands to decide whether they only read things and which files they touch. That analysis has changed in three ways:
- The headers of
for and while loops now go through a shared evaluation step. Before, only for loop words were handled, directly in place.
- A command that declares variables is now marked too complex when its words could take different shapes.
- The files named in an
rm command are now found by reading the command with two parsers and combining the results, instead of one.
Why
The permission checks are stricter and less likely to be fooled by unusual shell syntax.
See this entry in the whole of v2.1.311 →