Plan Mode

Plan Mode

Explore and analyze code safely without making any changes.

What Is Plan Mode?

Plan Mode is a read-only permission mode where Claude can explore your codebase, analyze code, and propose plans — but cannot write files, run commands, or make any changes. It is the safest way to get Claude's analysis.

How to Activate

Three ways to enter Plan Mode:

  • Shift + Tab — Cycle modes: defaultacceptEditsplan
  • Launch directly: claude --permission-mode plan
  • Prefix a single prompt with /plan to run just that turn in plan mode, then drop back

The Explore → Plan → Code Pattern

The most effective way to use Claude Code for non-trivial tasks:

1. Explore (Plan Mode)

Understand the codebase before touching anything:

text
/plan I need to add rate limiting to the API.
Explore @src/api/ and @src/middleware/.
What patterns are already used? Where should rate limiting go?

2. Plan (Still Plan Mode)

Ask Claude to produce a detailed implementation plan:

text
Based on what you found, create a step-by-step plan:
- which files to create/modify
- what tests to write
- what order to implement in
Don't implement yet.

3. Code (default / acceptEdits)

Approve the plan or Shift + Tab back to default / acceptEdits, then execute:

text
implement the rate limiting plan from above.
commit after each working step.

When to Use Plan Mode

  • Onboarding — Exploring a new codebase you just joined
  • Bug diagnosis — Tracing issues without accidentally changing code
  • Architecture review — Analyzing patterns, dependencies, and tech debt
  • Security audit — Scanning for vulnerabilities without modifying anything
  • Code review — Reviewing PRs with deep analysis

Tips

  • Use @ file references in Plan Mode — Claude can read any file you point to
  • Be specific about what analysis you need for complex architectural questions
  • When you approve a plan, Claude switches the session to the permission mode you picked (auto / acceptEdits / manual) and starts editing
  • Press Ctrl + G to open the proposed plan in your editor before approving
  • If you only need plan mode for one turn, prefix your prompt with /plan instead of switching modes

Why does 'plan before code' work so well?

The Explore → Plan → Execute loop is the fundamental pattern behind all autonomous agents. Understanding this architecture helps you work with any AI coding tool more effectively.

Learn the Agent Basics

Related Reading

  • Workflows — See Plan Mode in action in complete workflows
  • Cloud Workflows — Move large plans into Ultraplan
  • Dynamic Workflows — Turn broad plans into multi-agent workflow scripts
  • Debugging — Use Plan Mode for safe bug diagnosis
  • Hooks — Automate actions after planning

Continue with practice

You have finished the core ideas of Plan Mode.

If you want to turn the idea into something reusable, continue practicing on AgentWay.