[BUG] Ask permission rule for Edit is listed in /permissions but never prompts
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?
Version: Claude Code 2.1.287
Interface: VS Code extension, macOS
Model: claude-opus-5-5
Setting sources (from /status): User settings, Shared project settings
Summary
An ask rule in the shared project settings is loaded and shown in /permissions, but editing the matching file with the Edit tool goes through without any prompt. Reproduced in a fresh session.
Rule in .claude/settings.json (under permissions.ask):
"Edit(/src/styles/derived.css)"
What Should Happen?
Expected
A permission prompt before the edit, as the docs say explicit ask rules prompt in every mode.
Actual
Claude used the Edit tool and the file was changed with no prompt. Confirmed by git diff.
Checked and ruled out
- The rule is in the ask list, not allow. No allow rule or defaultMode in any settings file mentions this path.
- The edit was made with the Edit tool, not Bash.
- The working folder matches the project root, so the leading "/" anchor should resolve to <project>/src/styles/derived.css.
- disableBypassPermissionsMode is set to "disable".
Notes
/status shows "Auto mode server: Enabled". I don't know which permission mode the session was in when the edit happened. If auto mode or the classifier can approve edits that match an explicit ask rule, that contradicts the permissions docs.
Impact
Ask rules are used to protect files that need human approval. A rule that is listed but silently doesn't fire gives a false sense of protection. I've added a PreToolUse hook as a workaround.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
- Start a new Claude Code session from the project root.
- /status shows the working folder as the project root (/Users/<me>/Documents/reference-site).
- /permissions lists Edit(/src/styles/derived.css) under Ask, sourced from shared project settings.
- Ask Claude: "Add the comment / permission test / to the end of src/styles/derived.css."
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code 2.1.287
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗