Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.277 ·

New shell-command danger-pattern detector

A new detector flags shell commands containing risky constructs like command substitution before auto-approving them

TierYou'll noticehow much it should matter to you
Useful3my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaBash Safetywhat it touches
KindImprovementsin v2.1.277,
You'll notice

A new detector flags shell commands containing risky constructs like command substitution before auto-approving them

What

Claude Code now parses a shell command's structure (using a tree-sitter-based parser) to detect constructs considered unsafe to auto-approve without asking the user, including:

  • brace and parameter expansions
  • $'...'/$"..." style quoting
  • command substitution ($(...)) and backticks
  • process substitution (<(...) and >(...))
  • arithmetic expansion ($[...])
  • malformed or incomplete redirects

If any of these appear in a command, it's flagged as unsafe to auto-approve.

Why

These shell constructs can let a command do something other than what it appears to do at a glance, such as running hidden commands or reading unexpected input. Flagging them prevents Claude Code from auto-approving a command that looks safe but isn't.

See this entry in the whole of v2.1.277 →