DEV Community

Cover image for Plan Mode: Think Twice, Execute Once
Rajesh Royal
Rajesh Royal

Posted on

Plan Mode: Think Twice, Execute Once

Clear the fog of war before committing to action

From: x.com/adocomplete


"Move fast and break things" has its place. But in a complex codebase, moving fast often means breaking things you didn't even know existed. That API endpoint you're refactoring? It's called from 47 places, including a webhook you forgot about three months ago.

What if you could explore freely first? Let Claude read, search, analyze, and understand your codebase thoroughly — without changing a single line until you're ready?

Welcome to Plan Mode. Where reconnaissance comes before the raid.

The Problem

Claude Code is powerful. Sometimes too powerful. You ask for a "simple refactor," and before you can blink, files are modified, tests are updated, and configurations are changed. Most of the time, it's exactly right. But when it's not...

The undo stack becomes your best friend and worst enemy.

This creates a subtle anxiety. You hesitate before big asks. You break complex tasks into tiny, over-specified steps to maintain control. You spend more time describing what NOT to do than what you want done.

And there's another problem: sometimes you don't even know what you want yet. You're exploring. You need Claude to help you understand the landscape before you decide where to build.

In these moments, Claude's eagerness to help by doing things becomes a liability.

The Solution: Plan Mode

Plan Mode gives Claude full read access to your codebase while completely disabling write operations. Claude can explore, analyze, search, and reason — but cannot modify any files or run any commands that change state.

How to Use It

Toggle Plan Mode with a double Shift+Tab:

Shift+Tab, Shift+Tab → Plan Mode activated
Enter fullscreen mode Exit fullscreen mode

You'll see the mode indicator change:

🔍 PLAN MODE
Claude can read, search, and analyze but won't make any changes.
Enter fullscreen mode Exit fullscreen mode

Now ask freely:

What would be the implications of migrating from REST to GraphQL?
Enter fullscreen mode Exit fullscreen mode
Analyze the data flow through our authentication system.
Enter fullscreen mode Exit fullscreen mode
Find all the places where we're handling payments and explain
the error handling approach in each.
Enter fullscreen mode Exit fullscreen mode

Claude explores your entire codebase, traces dependencies, identifies patterns — and reports back without touching anything.

Switching Back

When you're ready to execute:

Shift+Tab → Normal Mode (or Act Mode)
Enter fullscreen mode Exit fullscreen mode

Now Claude can write. But you know exactly what you're getting into.

Pro Tips

  1. Default to Plan Mode: Many experienced users operate in Plan Mode 90% of the time. They use Claude for analysis and understanding, only switching to execution mode for specific, well-understood changes.

  2. Build a mental model first: Before any major refactoring, spend 10-15 minutes in Plan Mode. Ask Claude to map the territory: dependencies, call sites, potential conflicts. This reconnaissance saves hours of debugging later.

  3. Use Plan Mode for code reviews: "Explain what this PR changes and identify potential issues" — perfect Plan Mode task. Full analysis, zero risk of accidental modifications during review.

  4. Exploration sessions: Some of the best uses of Claude aren't about making changes — they're about understanding. Plan Mode removes the anxiety from open-ended exploration.

  5. Teaching and onboarding: Walk through a codebase with a new team member using Plan Mode. Claude explains, newcomer learns, nothing breaks.

  6. Safe "what if" analysis: "What would happen if we removed this deprecated module?" Get a complete impact analysis without accidentally starting the removal.

Real-World Use Case

A lead engineer at a mid-size startup shared their workflow:

"I default to Plan Mode about 90% of the time. Here's why: my job isn't to write as much code as possible. It's to make the right decisions. Claude in Plan Mode is my thinking partner."

Their typical session:

Phase 1 — Reconnaissance (Plan Mode):

> Show me how notifications work in our system.

> What are all the ways a user can trigger a notification?

> What would change if we wanted to add rate limiting to notifications?

> Identify the dependencies between the notification service and 
  the user service.
Enter fullscreen mode Exit fullscreen mode

Phase 2 — Decision:
"Based on Claude's analysis, I now understand that rate limiting notifications requires changes in three places, affects two downstream services, and has a potential race condition I hadn't considered."

Phase 3 — Execution (Normal Mode):

> Implement notification rate limiting. Add 100/hour per user.
  Handle the race condition by using Redis INCR with EXPIRE.
Enter fullscreen mode Exit fullscreen mode

"The execution phase is focused and surgical because the planning phase was thorough. I know exactly what I'm asking for. Claude knows exactly what it's doing. The result is clean, intentional changes instead of scattered edits."

The Fog of War Analogy

Think of Plan Mode like a strategy game's scouting phase:

  • Without scouting: You send units into unexplored territory and hope for the best.
  • With scouting: You reveal the map, identify threats and opportunities, then make informed moves.

Complex codebases have their own fog of war. Plan Mode clears it.

Conclusion

Speed without direction is just noise. Plan Mode ensures that when you do act, you act with complete understanding. The reconnaissance phase isn't overhead — it's insurance.

Think twice. Execute once.

Tomorrow: Claude gains eyes — real IDE-level code intelligence. Day 30 introduces LSP integration: instant diagnostics, go-to-definition, type information, and more. Claude sees what your editor sees.


Next time you're about to ask for a big change, try Shift+Tab twice first. Explore before you execute. You might be surprised what you discover.

Top comments (0)