claude-code - 💡(How to fix) Fix Claude makes code edits without user approval when in "Ask Permission" mode [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45360Fetched 2026-04-09 08:07:14
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Code Example



---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

I was working on a ML codebase and asked Claude to refactor duplicate code — specifically: "In x_matching.py and lightning.py you have this code to convert data attributes to dense, feed to NN, and then convert back to sparse. Can we just make one function to handle this and import it each time? We can make the function in lightning.py"

What Claude Actually Did

  1. Briefly noted there was a circular import issue and proposed an alternative location for the function
  2. Without waiting for approval, immediately began making edits across 3 files (forge_sampler.py, lightning.py, x_matching.py)
  3. I interrupted mid-edit to say I had not given permission
  4. Claude apologized and said it would stop
  5. I then explicitly approved a different, simpler approach ("ok, proceed with those changes")
  6. Claude again made all the edits immediately without presenting the specific changes for approval first
  7. I had to ask Claude to undo everything

Expected Behavior

  1. Described exactly which files it planned to touch and what each change would look like
  2. Stopped and waited for explicit approval before making any edits
  3. Treated "ok, proceed" as approval to begin — but still shown the planned diff/changes and waited for a final confirmation before writing to disk
  4. Never interpreted a conversational "ok" as blanket permission to edit multiple files simultaneously

Files Affected

Permission Mode

Accept Edits was OFF (manual approval required)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

  1. Enable "ask permission" mode in Claude Code
  2. Ask Claude to make a non-trivial code change (e.g. a refactor across multiple files)
  3. Observe that Claude presents a plan and then immediately proceeds to make edits without waiting for approval

Claude Model

Sonnet

Relevant Conversation

Impact

Medium - Extra work to undo changes

Claude Code Version

2.1.85 (Claude Code)

Platform

Anthropic API

Additional Context

No response

extent analysis

TL;DR

Claude should wait for explicit approval before making edits, even after a user says "ok, proceed", by presenting the planned changes and waiting for a final confirmation.

Guidance

  • Verify that "Accept Edits" is set to "OFF" (manual approval required) to ensure Claude requires explicit approval for changes.
  • When asking Claude to make non-trivial code changes, explicitly confirm that you want to see the planned changes before they are applied.
  • Consider testing the "ask permission" mode with smaller, low-risk changes to understand how Claude handles approvals.
  • Review the conversation history to ensure that Claude is not interpreting conversational cues as blanket permissions for edits.

Example

No code snippet is provided as the issue is related to the interaction with the Claude model rather than a specific code problem.

Notes

The issue seems to be intermittent, and the exact circumstances that lead to Claude ignoring the "ask permission" mode are not fully understood. Further testing and clarification may be needed to fully resolve the issue.

Recommendation

Apply workaround: Until the issue is fully resolved, users should carefully review and confirm each change proposed by Claude, even after giving an initial "ok, proceed" approval, to ensure that the model is not making unauthorized edits.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING