[BUG] Don't ask again" answer selected not persisting across similar 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?
## Bug Description
When using the "Don't ask again" checkbox on command approval prompts, the system continues to request approval for subsequent similar commands, even though they should be covered by the pre-authorized patterns.
## Steps to Reproduce
- Execute a
Bashcommand likegit commit -m "message 1" - When prompted for approval, check "Don't ask again"
- Approve the command
- Execute another similar command like
git commit -m "message 2" - Expected: Command executes without prompt (already covered by pattern)
- Actual: System requests approval again
## Environment
- Claude Code version: [your version]
- Platform: Windows 10
- Working directory contained git repository: Yes
## Additional Context
The pre-authorized patterns defined at the start of the conversation include:
Bash(git add:)
Bash(git commit:)
Bash(dotnet build:*)
These patterns with :* wildcards should cover ALL variations of these commands, but the approval system continues to prompt even after checking "Don't ask again".
This happens with:
- Different commit messages
- Combined commands (e.g.,
cd "path" && git commit ...) - Commands with different parameters but same base command
## Expected Behavior
Once "Don't ask again" is checked for a command pattern, all subsequent commands matching that pattern (or covered by the wildcard pre-authorization) should execute without additional prompts.
## Actual Behavior
The system re-prompts for approval on similar commands, even when:
- "Don't ask again" was previously checked
- Commands are covered by pre-authorized patterns like
Bash(git commit:*)
This significantly impacts workflow efficiency during iterative development sessions.
## Additional Bug: Wasteful Token Usage During Bug Reporting
While reporting this bug, the assistant used WebFetch to retrieve the GitHub issues URL, consuming user tokens unnecessarily.
Issue: The assistant should know standard GitHub URL patterns (/issues/new) without needing to fetch them.
Impact: Users are charged tokens for the assistant's meta-actions (like finding where to report bugs), which should be free/built-in knowledge.
Expected: Common platform URLs (GitHub, Stack Overflow, docs sites) should be part of the assistant's base knowledge without requiring web fetches.
Actual: Assistant makes unnecessary HTTP requests that consume user tokens for basic navigation.
What Should Happen?
- claude shoud run the commands without asking for permission
- send the bug report without consuming my tokens when reporting a bug.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Open Claude Code (version 2.0.32 or later)
- Start a conversation in a git repository
- Execute:
git add file.txt - When the approval dialog appears:
- Check the ✅ "Don't ask me again" checkbox
- Click "Allow"
- Execute:
git add file2.txt(different file, same command pattern)
Expected: No prompt (covered by "don't ask again")
Actual: Approval prompt appears again
Alternative reproduction:
- Execute:
git commit -m "first commit" - Check "Don't ask me again" and approve
- Execute:
git commit -m "second commit"(different message)
Expected: No prompt (same base command)
Actual: Prompt appears again
## What Makes It Worse
Even though pre-authorized patterns exist at session start:
Bash(git add:)
Bash(git commit:)
The "don't ask again" checkbox doesn't seem to:
- Persist the pattern across similar commands
- Respect the wildcard patterns already defined
- Save preferences between invocations with different parameters
## Impact
In a typical development session with 10-20 git operations, users must approve each one individually despite repeatedly checking "don't ask again", making the checkbox essentially non-functional.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.32 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗