How to Use Plan Mode in Claude Code
Plan Mode lets Claude explore and analyze your code without making any changes. It's your safety net for complex work—think first, execute later.
Plan Mode is a read-only setting you activate with Shift+Tab that lets Claude explore your codebase, ask questions, and build a detailed plan without modifying any files. Once you review and approve the plan, you switch back to normal mode and Claude executes it.
Think of it as a safety net for complex work. Claude analyzes everything first, you confirm the approach, and only then does it start making changes.
What Is Plan Mode?
Plan Mode is a permission setting that restricts Claude to read-only operations. When it's on, Claude can:
Can Do
- Read any file in your project
- Search for patterns with Grep and Glob
- List directories and explore structure
- Analyze code architecture
- Ask clarifying questions
- Create detailed written plans with task lists
- Suggest approaches and tradeoffs
- Delegate research to the Plan subagent
Cannot Do
- Modify or create files (Write and Edit tools are blocked)
- Run shell commands
- Install dependencies
- Run tests or builds
- Make commits
- Anything with side effects
Think of it like this: Plan Mode is Claude with its hands tied behind its back. It can look at everything, think about everything, talk to you about everything—but it can't touch anything.
How to Enter Plan Mode
Method 1: Keyboard Shortcut (During a Session)
Press Shift+Tab twice.
- First
Shift+Tab: Enables Auto-Accept Mode - Second
Shift+Tab: Enables Plan Mode
You'll see "plan mode on" in your terminal when it's active.
Method 2: Command Line Flag (Starting Fresh)
claude --permission-mode plan
This starts Claude Code directly in Plan Mode.
Method 3: Slash Command (During a Session)
Type /plan directly in the prompt to enter Plan Mode without using the keyboard shortcut.
Method 4: For One-Off Analysis
claude --permission-mode plan -p "Analyze the authentication system"
This runs a single query in Plan Mode and outputs the result.
How to Exit Plan Mode
Press Shift+Tab to cycle back to Normal Mode (or continue pressing to reach Auto-Accept Mode).
When to Use Plan Mode
Exploring Unfamiliar Code
Just joined a project? Use Plan Mode to have Claude give you a tour. It can read everything and explain how the pieces fit together—without accidentally breaking anything while you're still learning.
Complex Changes That Touch Many Files
If your task involves modifying 10+ files, start in Plan Mode. Let Claude analyze the scope, identify dependencies, and create a migration plan before touching anything.
Risky Refactoring
Changing authentication? Restructuring the database? Moving to a new architecture? Plan Mode lets Claude think through the implications and edge cases before committing to an approach.
When You Want a Second Opinion
Not sure how to approach something? Use Plan Mode to get Claude's analysis and recommendations without it immediately starting to implement them.
Rule of thumb: If you'd want to review Claude's approach before it starts working, use Plan Mode. If you trust Claude to just do it, use Normal Mode.
The Plan Mode Workflow
Here's how experienced Claude Code users approach complex work:
Step 1: Enter Plan Mode
Press Shift+Tab twice or start with claude --permission-mode plan
Step 2: Describe What You Want
Be specific about your goals. Example: "I need to refactor our authentication system to use OAuth2. Analyze the current implementation and create a migration plan."
Step 3: Answer Claude's Questions
Claude will ask clarifying questions about backward compatibility, constraints, preferences. Answer them to refine the plan.
Step 4: Review the Plan
Claude produces a detailed written plan. Read it. Ask follow-up questions. Request changes.
Step 5: Exit Plan Mode and Execute
Once you're satisfied, press Shift+Tab to return to Normal Mode. Tell Claude to "Execute the plan" and it will implement what you agreed on.
Real Example: Planning a Database Migration
Here's how a Plan Mode conversation might look:
> [Plan Mode enabled]
> I need to migrate our users table from storing passwords
> as MD5 hashes to bcrypt. Create a migration plan.
Claude: I'll analyze the current implementation...
[Claude reads files, analyzes code]
I found the password handling in these files:
- src/auth/user.js (password verification)
- src/api/login.js (login endpoint)
- src/api/register.js (registration endpoint)
- migrations/001_users.sql (schema)
Before I create the plan, I have some questions:
1. Should existing users be forced to reset passwords,
or should we support both hash formats during a transition?
2. Do you have a deadline for the migration?
3. Are there any service accounts or API integrations that
authenticate with passwords?
> Support both formats during transition. No hard deadline.
> No service accounts.
Claude: Here's the migration plan:
Phase 1: Add bcrypt support (backward compatible)
- Add bcrypt dependency
- Modify verifyPassword() to check both formats
- Update registration to use bcrypt
- Update password reset to use bcrypt
Phase 2: Migrate existing users (gradual)
- On successful login, re-hash password with bcrypt
- Add migration script for bulk conversion
Phase 3: Remove MD5 support (cleanup)
- Remove MD5 verification code
- Add database check for remaining MD5 hashes
Should I proceed with this plan?
Now you exit Plan Mode and tell Claude to execute Phase 1.
Plan Mode with Task Lists
One of the most powerful patterns is combining Plan Mode with Claude's task list feature. When you start in Plan Mode and ask Claude for a comprehensive plan, it creates a structured task list that you can view with Ctrl+T.
These task lists persist across context compactions. This means you can plan a large feature, approve the plan, switch to normal mode, and Claude will track progress through each task even across long sessions. Tasks support dependencies (directed acyclic graphs), so Claude knows which tasks must complete before others can start.
Pro tip: Start every complex task in Plan Mode. Ask Claude to create a comprehensive task list, review and refine it, then switch to normal mode and tell Claude to work through the tasks. Plans and task items survive compaction events, keeping Claude on track during extended sessions.
Plan Mode vs. Other Permission Modes
Claude Code has three main permission modes:
| Mode | What Claude Can Do | When to Use |
|---|---|---|
| Normal | Asks permission before each file edit and command | Everyday development with safety checks |
| Auto-Accept | Edits files automatically, still asks before commands | When you trust the direction and want speed |
| Plan Mode | Read-only analysis and planning only | Complex work where you want to review approach first |
| Delegate Mode | Coordination-only, restricts to team management tools | When using agent teams (appears in the cycle when a team is active) |
You can cycle through these by pressing Shift+Tab (or Alt+M in some terminals):
Normal → Auto-Accept → Plan → Normal → ...
When an agent team is active, Delegate Mode is also included in the cycle.
Tips for Better Plans
- Be specific about constraints: Deadlines, backward compatibility, performance requirements. The more Claude knows, the better the plan.
- Ask about tradeoffs: "What are the downsides of this approach?" Claude can analyze alternatives.
- Request phased plans: For big changes, ask Claude to break the work into independently-deployable phases.
- Use task lists: Ask Claude to create a task list as part of the plan. Press
Ctrl+Tto toggle the task list view, and tasks persist across compaction events. - Leverage extended thinking: Press
Option+T(Mac) orAlt+Tto enable extended thinking mode. This gives Claude more reasoning time for complex plans. You can also include "ultrathink" in your prompt to trigger it.
Common Mistakes
- Forgetting to exit Plan Mode: You approved the plan and told Claude to execute, but nothing happens. Check if you're still in Plan Mode—Claude literally can't make changes while it's on.
- Skipping Plan Mode for complex work: Jumping straight into implementation for multi-file changes often means more back-and-forth later. A few minutes in Plan Mode saves hours of corrections.
- Not answering Claude's questions: When Claude asks clarifying questions in Plan Mode, answer them. The plan quality depends on understanding your constraints.
FAQ
Can I use Plan Mode for non-code projects?
Yes. Plan Mode works for any project where you want Claude to analyze before acting—documentation, data files, configuration. It's read-only across everything.
Do I lose the plan if I exit Plan Mode?
No. The conversation history stays. You can reference the plan Claude created even after switching modes.
Can Claude execute shell commands in Plan Mode?
No. All commands that have side effects are blocked. Claude can only read and analyze.
What's the keyboard shortcut again?
Shift+Tab twice to enter Plan Mode. Shift+Tab again to cycle to Normal Mode.
Related Guides
- How to Use CLAUDE.md Files — set project context Claude remembers
- Slash Commands in Claude Code — all the shortcuts
- What Is Claude Code? — the basics
Like Claude Code? Meet Your Chief AI Officer
Watch me build a complete website using only plain English—no coding required. Then try it yourself.
Get the Free Blueprint href="/blueprint">Watch the Free Setup Video →rarr;