[BUG] sandbox.filesystem.denyRead does not block reads (file-type patterns and plain folder paths both fail)
Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 25, 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?
sandbox.filesystem.denyRead does not block file reads, whether using a wildcard file-type pattern or a plain folder path. Files that should be denied are read successfully.
What Should Happen?
Any file matching a denyRead rule (whether a glob pattern like *.key, or a plain folder path like ~/blocktest) should be blocked from being read, with a permission-denied style error.
Error Messages/Logs
Steps to Reproduce
- Add a denyRead rule to sandbox.filesystem in settings.json, e.g. "denyRead": ["~/blocktest"]
- Fully restart Claude Code so settings reload
- Create a file inside that folder (or matching the pattern)
- Try to read it with cat
- Read succeeds (exit code 0) instead of being denied
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.220
Platform
Other
Operating System
Other Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_