Model re-attempts denied tool call after user explicitly says 'no'
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Model: claude-opus-4-6 (via VS Code extension)
Platform: Windows 11
When the user explicitly says "no" to a proposed action (commit + push), the model proceeds to execute that exact action anyway. The tool rejection error message clearly states "STOP what you are doing and wait for the user to tell you how to proceed" -- but the model ignores this and re-attempts the same denied operation.
Reproduction Steps
- Have uncommitted changes (e.g.,
.gitignoreedits) - User asks "push?" -- meaning "should we push?"
- Assistant asks "Want me to commit and push?"
- User replies: "no"
- Assistant immediately runs
git add .gitignore && git commit -m "..." && git push-- the exact action the user just denied
What Should Happen
The model should stop and wait for the user's next instruction, as the tool rejection message explicitly says.
What Actually Happens
The model receives the rejection with the message:
"The user doesn't want to proceed with this tool use. The tool use was rejected. STOP what you are doing and wait for the user to tell you how to proceed."
Despite this, it immediately re-attempts the same git add && git commit && git push command.
Why This Matters
- Trust violation: User explicitly denied an action, model does it anyway
- Data safety: For destructive git operations (force push, reset), this pattern could cause data loss
- User intent misread: The model interpreted "no" as "no to asking, just do it" instead of "no, don't do this"
Additional Context
The system prompt and CLAUDE.md rules include:
- "If the user denies a tool you call, do not re-attempt the exact same tool call"
- Git safety rules requiring user confirmation before commits and pushes
- "NEVER push without user confirmation"
The model acknowledged the error after being called out, confirming it understood "no" meant "don't do this."
Environment
- Claude Code version: latest (VS Code extension)
- Model: claude-opus-4-6
- OS: Windows 11 Pro
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
A
PreToolUsehook can track denied tools and block subsequent retries:When a tool is denied, the PermissionRequest hook marks it:
A simpler approach using
UserPromptSubmit:Additional Example: Git Commit Denial → Assumes Success → Attempts Invalid Revert
This issue also manifests in a different pattern: Claude not only retries denied actions but assumes they succeeded and attempts to "undo" actions that never happened.
What Happened:
Sequence:
git commit -m "message with Claude attribution""The user doesn't want to proceed with this tool use"git reset HEAD~1to "undo" the commitExpected Behavior:
After tool denial, Claude should:
git status) before proceedingActual Behavior:
Impact:
This isn't just about retrying the same action - it's about losing track of what actually happened. The model continues executing a planned sequence as if denied actions completed successfully.
Workaround:
Added user memory requiring state verification before any git revert:
This pattern likely affects any multi-step workflow where a denied tool call should trigger plan revision rather than continuation.
Environment:
Related to the retry loop issue, but distinct in that Claude proceeds with downstream actions rather than retrying the same action.
---
Question for maintainers: Should this be filed as a separate issue? While related to the "retry after denial" problem, this variant is about assuming denied actions succeeded and proceeding with downstream logic rather than retrying the same action. Let me know if you'd prefer a separate issue for tracking.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This is an open issue, not fixed.
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.