Module 4 · Page 1 of 8 · 20 minutes

Plan before you build

Plan mode gives you a checkpoint: the agent investigates the project, proposes an approach, and lets you review it before it starts making changes.

What is plan mode?

When you ask an AI coding agent to build something, it can often start changing files immediately. For a very small task, that may be fine. But it's usually better to ask the agent to plan first.

In plan mode, the agent examines the task, looks through the relevant files, and proposes an approach before it starts making changes.

As Boris Cherny, the creater and head of Claude Code at Antropic puts it when sharing tips about using Claude Code:

“Start every complex task in plan mode. Pour your energy into the plan so Claude can 1-shot the implementation.”
— Boris Cherny (@bcherny), creator and Head of Claude Code at Anthropic

How to turn on plan mode

The exact control depends on the coding agent you're using. The underlying idea is the same: switch the agent into a mode where it can inspect and reason about the project without immediately editing it.

Claude Code

During a Claude Code session, press Shift+Tab until the status bar shows plan mode on.

A terminal status bar reading 'plan mode on (shift+tab to cycle) · ← for agents', with an arrow pointing to the indicator.
The status bar confirms plan mode is on before you send a prompt.

OpenCode

Press Tab to switch from Build mode to Plan mode. OpenCode shows the current mode in the lower-right corner.

Codex

Use /plan or press Shift+Tab to enter Plan mode.

Tip Don't worry about memorizing every shortcut. Interfaces change, and different agents use different names. Look for a Plan, Planning, or Read-only mode — or simply tell the agent: Don't make any changes yet. Inspect the project and propose a plan first.

What happens during planning?

Suppose you tell an agent:

Add a page to my website where managers can review customer
feedback.

There are many decisions hidden inside that request. The agent may need to figure out:

In plan mode, the agent investigates these questions first and explains what it intends to do.

Example: what the agent might propose

I found that the site uses React and already has a reusable
table component. I propose adding a new /feedback page that
displays customer comments, ratings, dates, and product
categories. I will reuse the existing table styling and add
filters for rating and product category. I expect to modify
two existing files and create one new component.

You can inspect this plan before letting the agent continue.

Why planning matters

When you're vibecoding, you often know what you want the finished product to do without knowing exactly how the code should change. That's what makes planning especially valuable.

A good plan gives you a checkpoint where you can ask:

Does the agent understand what I'm trying to build?

It's much easier to correct a mistaken plan than to undo dozens of changes after the agent has already implemented the wrong idea.

Planning can also reveal assumptions that were hidden in your original request. For example, the agent might plan to:

Show all customer feedback in one long table.

But you intended:

Let managers first see a summary of common issues, then drill
down into individual comments.

Seeing the plan lets you catch the difference before any code gets written.

Example: build immediately versus plan first

Imagine you've already built a simple sales dashboard and ask:

Add a way for managers to compare this month with last month.

Without planning

The agent may immediately add a second chart, modify the data-processing code, and change the page layout.

You inspect the result and realize you wanted a simple percentage-change indicator next to each metric — not another chart. The implementation may work perfectly, but the agent solved the wrong problem.

With planning

You first ask, in plan mode:

Plan how you would add a way for managers to compare this
month with last month. 

The agent might propose:

I will add last month's value next to each KPI and calculate
the percentage change. I will display an up or down indicator
beside the current value. The existing charts will remain
unchanged.

Now you can respond:

Good, but don't use arrows. Show the percentage change as
text underneath each KPI.

Only after the plan looks right do you ask the agent to implement it.

Explore Before Planning Planning assumes you already know roughly what you want. If you don't yet — you're still comparing options or figuring out requirements — there's often an earlier stage: exploration (or "brainstorming"). Feel free to use the browser chatbot interface when you are still figuring out what you want. It's a low-friction place to brainstorm, compare options, refine requirements, and work with documents or screenshots. You can even ask the browser AI to summarize your discussion into a clear brief or prompt. Once the task is clearer, use the terminal agent to inspect the actual project, plan the implementation, edit files, and test the result.

Exercise: should you plan first?

For each request below, decide whether you would ask the agent to plan first or let it implement immediately.

Request Plan first?
Change the heading from “Sales Report” to “Weekly Sales Report.”
Add user authentication to an existing web app.
Change the background color of one button.
Add a customer feedback page with filters and summary metrics.
Redesign a dashboard so executives can compare performance across regions.
Fix a typo in a navigation menu.
Import data from a new external source and incorporate it into an existing analysis.

There isn't always one correct answer. The goal is to recognize when understanding and agreeing on the approach is valuable before implementation begins.

Next · Page 2 of 8
Set up your information environment