[BUG] blockReadsOutsideWorkingDirectories blocks reads inside working directory when path is resolved via cd + glob
Status Open
Reported on v2.1.278
Maintainer reply None cached
Activity 0 comments · opened Sep 21, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
permissions.blockReadsOutsideWorkingDirectories incorrectly blocks Bash commands that read files inside the working directory when the path is reached via a cd into a subdirectory followed by a shell glob.
What Should Happen?
Command executes without prompt or block. /Users/foo/projects/bar/backend/target/failsafe-reports is a subdirectory of the working directory and should be considered inside scope.
Error Messages/Logs
grep names a path that is computed at run time, which cannot be checked
against the read block (permissions.blockReadsOutsideWorkingDirectories)
Steps to Reproduce
Start claude in /Users/foo/projects/bar/ (project root), then let Claude execute:
cd /Users/foo/projects/bar/backend/target/failsafe-reports && \
grep -h -B2 -A12 "SomePattern" *SomeTest.txt | head -40
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.278
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_