Claude Code bug: Read deny rules make every post-cd compound command prompt for approval

railapex · ghdev · 2026-09-03

A reproducible Claude Code bug (v2.1.257–2.1.259, Windows Git Bash) shows that with any Read() deny rule configured (e.g. Read(/.env)), every compound Bash command containing cd followed by a relative-path read triggers a manual approval — even when the cd target is an absolute literal path, and reportedly even in bypass-permissions mode. Subagent Bash calls surface one prompt per file read in the parent session. The author verified with headless probes (claude -p --permission-mode auto) capturing exact tool inputs: cd D:/repo && sed ... alone is allowed, but adding ; or an echo triggers the cd-compound-read guard, which cannot statically resolve post-cd relative paths.

Original post →

More from coding & agent

coding & agent channel →