[BUG] Write tool gate denies path that permissions.allow glob clearly matches
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?
Environment: macOS Darwin 25.5.0, Claude Code Opus 4.7
Settings (~/.claude/settings.json, relevant excerpt):
"permissions": {
"allow": [
"Write(/Users/mark.orsted/obsidian/10-Projects/**)",
"Bash(python3 -c *)"
],
"additionalDirectories": ["/Users/mark.orsted/obsidian"]
}
Hypothesis: Write tool gate uses a different (broken) evaluator than Bash, OR a per-file permission cache that misses after resume and falls through to a UI prompt regardless of glob match.
Workaround: Route writes through Bash(python3 -c "open(p,'w').write(...)") when this happens.
What Should Happen?
Expected: Write succeeds first try because the path matches the ** glob.
Actual: Three permission denials, then a workaround via Bash succeeds for the same path.
Error Messages/Logs
Steps to Reproduce
Repro:
- Attempt Write to /Users/mark.orsted/obsidian/10-Projects/<Proj>/Sessions/<new-file>.md
- Tool returns: "Claude requested permissions to write to <path>, but you haven't granted it yet."
- Retry 2x — same denial.
- Bash invocation
python3 -c "open('<same path>','w').write(...)"— succeeds first try. - After SessionStart:resume, Write to a different new file in the same dir works without prompt.
Expected: Write succeeds first try because the path matches the ** glob.
Actual: Three permission denials, then a workaround via Bash succeeds for the same path.
Hypothesis: Write tool gate uses a different (broken) evaluator than Bash, OR a per-file permission cache that misses after resume and falls through to a UI prompt regardless of glob match.
Workaround: Route writes through Bash(python3 -c "open(p,'w').write(...)") when this happens.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.150.
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗