AI-101

Lesson 19

Plan Mode Deep Dive

AI Confidence: 90%

AI-generated

Plan Mode Deep Dive

Learning Objectives

Enter Plan Mode for complex tasks

Refine plans before execution

Edit plans directly in your text editor

Execute plans with confidence

Know when planning adds value versus overhead

Introduction

Plan Mode separates thinking from doing. Claude explores your codebase, asks questions, and creates a detailed plan. Only after you approve does Claude make changes.

This approach works well for complex tasks. Instead of watching Claude make changes you might need to undo, you see the full plan upfront. You can refine it, ask questions, and ensure the approach is right before any code changes.

This lesson goes deeper into Plan Mode workflows. You will learn to use planning effectively and know when it helps versus when it adds unnecessary overhead.

Entering Plan Mode

Several ways to enter Plan Mode:

Shift+Tab toggle:

Press Shift+Tab until you see "plan mode on" at the bottom.

Direct command:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Or with a task:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Command line:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Start a session directly in Plan Mode.

The Planning Workflow

A typical Plan Mode workflow has four phases:

1. Explore

Ask questions to understand the current state:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude reads files and answers without making changes.

2. Plan

Ask for a detailed implementation plan:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude produces a step-by-step plan: files to change, order of changes, risks, testing approach.

3. Refine

Ask follow-up questions and request adjustments:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

The plan evolves based on your input.

4. Execute

When the plan is right, switch to normal mode and execute:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude follows the plan, making changes step by step.

Editing Plans Directly

Press Ctrl+G to open the current plan in your text editor.

This lets you:

Edit plan steps directly

Add details Claude missed

Remove steps you do not want

Reorder operations

Save the file and close the editor. Claude sees your edits and follows the updated plan.

This is powerful for complex plans where conversation is too slow. Direct editing is faster and more precise.

When to Use Plan Mode

Good for:

Multi-step changes across many files

Unfamiliar codebases where you want to explore first

High-risk changes where mistakes are costly

Complex refactors with many moving parts

When you want to understand the approach before committing

Skip planning for:

Simple, obvious changes

Single-file edits

Tasks you could describe in one sentence

When you trust Claude and can rewind if needed

The rule of thumb: if you can describe the diff in one sentence, skip planning. If the task feels complex or uncertain, plan first.

Plan Mode in Headless Scripts

You can run Plan Mode non-interactively:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude analyzes and outputs recommendations without making changes. This is useful in CI pipelines or for generating reports.

Combining with Sessions

Plans work well with session management:

Name planning sessions:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

You can return to this planning session later.

Fork before executing:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Fork the session, then execute in the fork. Keep the original plan session for reference.

Export plans:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Save the plan as a document for team review.

Auto-Naming from Plans

When you accept a plan, Claude Code automatically names your session based on the plan content. This makes sessions easier to find later.

If you already named the session with /rename, accepting a plan does not overwrite your name.

Iterating on Plans

Plans rarely come out perfect the first time. Expect iteration:

Ask probing questions:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Request alternatives:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Challenge assumptions:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Good plans emerge from dialogue, not from accepting the first answer.

Executing Partial Plans

You do not have to execute the entire plan at once:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude executes partial plans and waits. This lets you verify each phase before continuing.

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Incremental execution reduces risk.

Key Takeaways

Plan Mode separates exploration and planning from execution

Enter with Shift+Tab, /plan, or --permission-mode plan

The workflow: explore, plan, refine, execute

Press Ctrl+G to edit plans in your text editor

Use planning for complex, multi-step, or risky changes

Skip planning for simple, obvious tasks

Iterate on plans through questions and challenges

Execute incrementally to reduce risk

Try It Yourself

Practice the planning workflow:

Start Claude Code and enter Plan Mode with Shift+Tab.

Pick a medium-complexity task (like adding a feature or refactoring).

Ask Claude to explain the current implementation.

Ask Claude to create a plan for the change.

Ask two follow-up questions to refine the plan.

Press Ctrl+G to open the plan in your editor. Make a small edit.

Switch to normal mode with Shift+Tab.

Ask Claude to implement just the first step.

Review the changes before continuing.

This exercise builds your planning workflow.

Sources

https://code.claude.com/docs/en/common-workflows - Plan Mode workflow documentation

https://code.claude.com/docs/en/best-practices - When to use planning versus direct execution

https://code.claude.com/docs/en/permission-modes - Plan Mode technical details