[BUG] Plan mode prompts for permission on already-allowed read-only Bash commands
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:
Claude Code VS Code extension v2.1.76
macOS (Darwin 23.4.0)
Working directory is a git worktree (not the main repo checkout)
Description:
When entering plan mode (which is inherently read-only), Claude Code prompts for user permission on every Bash call — even when those commands are read-only and explicitly listed in the project's .claude/settings.json allow list. This makes plan mode impractical for tasks like code reviews that require reading diffs, since each git diff, git status, or git log invocation triggers a permission prompt.
What Should Happen?
Read-only Bash commands that match an entry in permissions.allow should execute without prompting, regardless of whether plan mode is active. Plan mode's restriction is "no writes" — it shouldn't add a permission gate on top of the existing allow list for commands that are already approved and inherently read-only.
Error Messages/Logs
Steps to Reproduce
Reproduction steps:
Open a git repo (ideally a worktree) in VS Code with the Claude Code extension
Add read-only git commands to .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(git diff:*)",
"Bash(git status:*)",
"Bash(git log:*)",
"Bash(ls:*)"
]
}
}
Start a conversation and enter plan mode (e.g. via /plan)
Ask Claude to review code changes — it will attempt git diff, git status, etc.
Observe: Each Bash call prompts for permission despite matching the allow list
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Plan mode re-prompting for already-allowed commands is a known pattern — the plan step uses a different permission context than direct execution.
Workaround — PreToolUse hook to auto-approve read-only commands:
Register in
~/.claude/settings.json:This bypasses the permission prompt entirely for read-only commands, regardless of mode (plan, normal, etc.).
For a broader setup:
npx cc-safe-setup— includes a cd+git auto-approver that handles this pattern.closing given duplicate. thanks for the workaround, i had to add
cdto the list of allowed commands. i hope this bug gets fixed soon.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.