Claude Code sandbox bug: naive substring match on "git" blocks innocent commands

findepi · ghdev · 2026-10-09

A confirmed bug in Claude Code: the worktree-isolation guard naively substring-matches "git", refusing any Bash command containing "git" anywhere plus shell expansion — even when git isn't invoked at all.

Real-world impact:

The reporter proposes parsing the command and matching git only in command position, not as a substring of args, flags, or patterns. Version 2.1.295, macOS, with a repro.

Original post →

More from coding & agent

coding & agent channel →