
If Claude Code ignores plan mode and edits your files anyway, the most likely reason is that the session was no longer in plan mode when the edit happened. Approving a plan ends plan mode right away, and so does pressing Shift+Tab at the approval prompt, because that key approves the plan there. Look at the status bar under the prompt: if it doesn’t say plan mode on, plan mode isn’t protecting you.
The second big cause is bypass permissions. Anthropic’s docs say that in an interactive terminal session started with bypass permissions available (for example with --dangerously-skip-permissions or --allow-dangerously-skip-permissions), plan mode’s blocks don’t hold, and edits or commands can run without a prompt. Restart without that flag and the blocks come back.
Shell commands are the third cause. When auto mode is available, a classifier reviews shell commands during planning instead of asking you, so a command it approves can still change something.
Set "useAutoModeDuringPlan": false to get a prompt for every command outside the read-only set. We tested each case below in a real session.
Browse all our Claude Code tutorials for more fixes and how-tos.
Tested with Claude Code v2.1.332 on macOS on December 1, 2026. We used a throwaway folder called trip-notes with two small text files, and we started Claude Code with project and local settings only, so nothing in our real setup changed. The bypass permissions case comes from Anthropic’s official docs, because we did not run a bypass session for this test.
Quick Summary
| What you see | Likely cause | Fix | Tested by us? |
|---|---|---|---|
| Edits happen and the status bar doesn’t say plan mode | You weren’t in plan mode, or /plan only covered one prompt | Press Shift+Tab until plan mode on shows | Yes |
| Edits start right after the plan appears | The plan was approved, often with Shift+Tab | Press Esc at the approval prompt to keep planning | Yes |
| Edits or commands run with no prompt at all | Bypass permissions is available in the session | Restart without the skip-permissions flags | From the docs |
| A shell command changed a file | The auto mode classifier approved it | Set useAutoModeDuringPlan to false | Yes |
A new .md file appeared | Claude’s own plan file | Expected; move it with plansDirectory | Yes |
| VS Code edits even with a plan default | The extension ignores the project defaultMode | Set claudeCode.initialPermissionMode to plan | From the docs |
What Plan Mode in Claude Code Actually Blocks
Plan mode tells Claude to research and propose changes without making them. According to the permission modes documentation, Claude reads files, runs shell commands to explore, and writes a plan, but it doesn’t edit your source until you approve the plan.
Plan mode is not a read-only lock on your whole computer. It blocks file edits by Claude’s editing tools, and it treats shell commands differently depending on your session. If you want a refresher on the basics first, our guide on using plan mode walks through a full planning session.

Here is how each kind of action behaves while you plan:
- Reading files and read-only commands such as
ls,cat,grepandgit statusrun without asking. - Claude writes its own plan file to
~/.claude/plans/, or to the folder you set withplansDirectory. - Other shell commands go to the auto mode classifier when auto mode is available, or to a permission prompt when it isn’t.
- Edits to your files stay blocked until you approve the plan.
Plan mode blocks edits, not every change. Shell commands and approvals are where most surprises come from.
Cause 1: You Weren’t Really in Plan Mode
This is the most common mix-up. In the terminal, Shift+Tab cycles through permission modes, and it’s easy to stop one press too early. In our test, a plain claude started in auto mode, and it took three presses to reach plan: auto, then Manual, then accept edits, then plan.
The only reliable check is the status bar under the prompt. It shows a cyan plan mode on when you’re planning. Anything else, like accept edits on or auto mode on, means Claude can edit files.

claude --permission-mode plan shows “plan mode on” in the status barThe /plan prefix covers one prompt only
You can also enter plan mode by starting a single prompt with /plan. The docs describe this as prefixing a single prompt, so don’t expect the next prompt to stay in plan mode. If you want a whole session of planning, start it with claude --permission-mode plan or switch with Shift+Tab.
The fix
- Press
Shift+Tabuntil the status bar readsplan mode on. - Or start fresh with
claude --permission-mode plan. - To make plan the default for a project, add
"defaultMode": "plan"underpermissionsin.claude/settings.json.
{
"permissions": {
"defaultMode": "plan"
}
}Cause 2: The Plan Was Approved, Sometimes by Accident
When Claude finishes a plan, it shows an approval prompt. In our session on v2.1.332, the options read “Yes, and use auto mode”, “Yes, manually approve edits” and “Tell Claude what to change”. Under the third option was a small hint: shift+tab to approve with this feedback.

Shift+Tab here approves the planThis is the trap. Many people press Shift+Tab to leave plan mode, but at this prompt the same key approves the plan. The docs confirm it: at the approval prompt, press Esc first, since Shift+Tab there approves the plan.
We tried it. We asked Claude to change the hotel line in notes.txt, waited for the plan, and pressed Shift+Tab. The session switched to auto mode and Claude edited the file within seconds.

From Claude Code’s point of view, nothing was ignored. Approving a plan exits plan mode and switches the session to the mode that option describes, so edits are expected from then on.
The fix
- At the approval prompt, press
Escif you aren’t ready. In our test, Claude confirmed nothing was edited and stayed in plan mode. - Pick “Tell Claude what to change” to keep planning with feedback.
- Pick “Yes, manually approve edits” if you want to review each edit after approving.
- Press
Ctrl+Gto open the plan in your editor and change it before you approve.
Cause 3: Bypass Permissions Is Available in the Session
This one surprises people, and it’s the closest to plan mode truly being ignored. The docs warn that in interactive terminal sessions with bypass permissions available, you shouldn’t rely on plan mode’s blocks. A file edit or shell command Claude attempts during planning can run without prompting.
Bypass permissions becomes available when you start with any of these:
--dangerously-skip-permissions--permission-mode bypassPermissions--allow-dangerously-skip-permissions, which adds bypass to theShift+Tabcycle without turning it on"defaultMode": "bypassPermissions"in your user settings, a--settingsfile or managed settings
The --allow- variant is the sneaky one. You might start in plan mode and never see the word bypass in the status bar, yet the plan blocks are relaxed because bypass is available. Explicit ask rules and recognized dangerous rm removals still prompt, according to the docs.
The fix
Restart Claude Code without any skip-permissions flag and check your user settings for a bypassPermissions default. If you use a shell alias for claude, look there too. Our guide on bypass permissions mode covers every way it gets turned on.
The docs also note that plan mode keeps its blocks where there’s no interactive terminal, such as claude -p runs, the Agent SDK and the VS Code extension’s chat panel.
Cause 4: A Shell Command Changed the File
Plan mode blocks Claude’s edit tools, but shell commands follow their own rules. The docs list three cases, and the first one that matches applies:
| Session | What happens to a shell command during planning |
|---|---|
| Bypass permissions available | Can run with no classifier and no prompt |
Auto mode available and useAutoModeDuringPlan on (the default) | The classifier reviews it; approved commands run |
Auto mode not available, or useAutoModeDuringPlan off | Commands outside the read-only set prompt you |
So with default settings, a command like sed -i or echo ... >> file isn’t sent to you for approval. It goes to the classifier, and if the classifier approves it, it runs.
In our test, Claude itself declined. We asked it to run echo 'Flight: TP 1351' >> notes.txt while planning, and it replied that it couldn’t run that while plan mode was on, because the command appends to a file. That’s good behavior, but it’s Claude’s judgment, not a hard block, so don’t count on it for every command.

The fix: turn off the classifier during planning
The settings reference describes useAutoModeDuringPlan. Set it to false and you get a permission prompt for every command outside the built-in read-only set. It works in user, local or managed settings, not the shared project file.
We put it in .claude/settings.local.json in our demo folder. We also set plansDirectory in .claude/settings.json so plan files stayed inside the project.

Inside Claude Code, /config showed the change. Searching for “plan” listed “Use auto mode during plan” as off.

/config screen shows “Use auto mode during plan” switched offRead-only checks still run without a prompt. With the setting off, we asked Claude to run python3 --version in plan mode, and it ran straight away. Claude Code treats simple checks like this as safe, so you only see prompts for commands that could change things.

Cause 5: The Only New File Is the Plan Itself
Sometimes the “edit” is a new Markdown file you didn’t ask for. That’s Claude’s own plan file. The permission docs list the current session’s plan files in ~/.claude/plans/, or in your plansDirectory, among the files Claude Code may write.
In our first session, the approval prompt showed the plan’s path under ~/.claude/plans/. After we set "plansDirectory": "./plans", the next plan landed in the project’s plans folder instead. Your source files were untouched in both cases.
Other Reasons Claude Code Seems to Ignore Plan Mode
Hooks can’t approve edits while you plan
If you wrote a PreToolUse hook that returns "allow", you might worry it lets edits through, but it doesn’t. The permissions documentation says that in plan mode, apart from ExitPlanMode, a hook’s "allow" has no effect on a file edit or another call that isn’t read-only.
A hook can still block calls. Our hooks guide explains how they work.
VS Code doesn’t read the project default
The docs say conversations the VS Code extension starts don’t read project settings for the starting permission mode. If you set "defaultMode": "plan" in .claude/settings.json and expect it in VS Code, set claudeCode.initialPermissionMode to plan in your VS Code user settings instead.
Your own edits or another tool
Plan mode only governs what Claude does, so a formatter on save, a file watcher or a command you typed with the ! prefix can all change files while Claude plans. Check what else touches the folder before blaming Claude.

Try It Yourself
Make a throwaway folder with one text file, start claude --permission-mode plan, and paste this prompt:
Change the first line of notes.txt to say "Draft 2". Plan it first; don't edit yet.When the approval prompt appears, press Esc and check the file with !cat notes.txt. It should be unchanged. Then run the prompt again and pick “Yes, manually approve edits”, and watch the status bar change as the edit happens.
Common Mistakes
- Pressing
Shift+Tabat the approval prompt to “get out”, which approves the plan instead. - Using
/planonce and assuming every later prompt is also in plan mode. - Starting with
--allow-dangerously-skip-permissionsout of habit, which relaxes plan mode’s blocks. - Putting
useAutoModeDuringPlanin the shared.claude/settings.json, where it doesn’t apply; use a user or local file. - Treating plan mode as a sandbox. It’s a workflow guard, not a security boundary.
Pro Tips
- Glance at the status bar before every risky prompt. It’s the single source of truth for your mode.
- Use “Yes, manually approve edits” for unfamiliar code, so you still review each change after approving.
- Keep plans in your repo with
plansDirectoryso you can review them later. - Add deny rules for anything that must never run, since deny rules block in every mode. Our guide to permission modes shows how modes and rules fit together.
- If a command was refused by the classifier instead, see our post on auto mode denials.
Cheat Sheet

Frequently Asked Questions
Why does Claude Code edit files in plan mode?
Usually the session left plan mode, because the plan was approved or the mode was never on. Otherwise, bypass permissions is available, or an approved shell command made the change.
How do I leave plan mode without approving the plan?
Press Esc at the approval prompt first, then press Shift+Tab to switch modes. Pressing Shift+Tab while the prompt is open approves the plan.
Can Claude run shell commands in plan mode?
Yes. Read-only commands always run. Other commands go to the auto mode classifier by default, or prompt you if auto mode isn’t available or useAutoModeDuringPlan is false.
Is plan mode safe with –dangerously-skip-permissions?
No. The docs say not to rely on plan mode’s blocks in terminal sessions with bypass permissions available. Edits and commands can run without a prompt.
Why is there a new .md file after planning?
That’s Claude’s plan file. It goes to ~/.claude/plans/ unless you set plansDirectory to another folder.
Conclusion
When Claude Code ignores plan mode and edits files anyway, the mode is almost always doing what it was designed to do. In our tests, plan mode blocked the edit and Claude declined a file-writing command, but a single Shift+Tab at the approval prompt approved the plan, switched to auto mode and changed the file. Check the status bar, press Esc instead of Shift+Tab when you aren’t ready, start without skip-permissions flags, and set useAutoModeDuringPlan to false if you want every non-read-only command to ask first. For other problems, our list of Claude Code errors and our Claude AI overview are good next stops.


