Plan Mode
Plan mode is a specialized interaction mode where Claude focuses on planning instead of executing. Use it for complex features to define requirements, explore options, and create specifications—before writing any code.
What Is Plan Mode?
Section titled “What Is Plan Mode?”In plan mode, Claude:
- ✅ Asks clarifying questions
- ✅ Explores options and tradeoffs
- ✅ Creates detailed specifications
- ✅ Presents plans for your approval
- ❌ Doesn’t write code (until you approve)
- ❌ Doesn’t execute commands
- ❌ Doesn’t modify files
It’s the difference between:
Normal mode:
> add user authentication
# Claude immediately starts writing codeCreating auth.py...Plan mode:
> add user authentication
Before I implement this, I have some questions:
1. What authentication method? ○ JWT tokens (stateless) ○ Session cookies (traditional) ○ OAuth 2.0 (third-party)
2. Password requirements? [asks for specifics]
3. Do you need password reset functionality? [clarifies scope]Activating Plan Mode
Section titled “Activating Plan Mode”Method 1: Keyboard Shortcut
Section titled “Method 1: Keyboard Shortcut”Press Alt+M (Windows/Linux) or Option+M (Mac) to cycle through modes:
Normal Mode → Plan Mode → Normal Mode → ...Look for the mode indicator in your interface.
Method 2: Explicit Request
Section titled “Method 2: Explicit Request”Tell Claude you want to plan first:
> add a notification system> before implementing, interview me to understand requirements
> add search functionality> plan mode: let's define the spec before coding
> implement user preferences> ask clarifying questions first, don't code yetHow Plan Mode Works
Section titled “How Plan Mode Works”-
You describe what you want
> add rate limiting to the API -
Claude asks clarifying questions
Uses the AskUserQuestion tool to present structured questions:
┌─────────────────────────────────────────┐│ What endpoints need rate limiting? ││ ││ ○ All endpoints ││ ○ Only authenticated endpoints ││ ○ Specific endpoints (specify) │└─────────────────────────────────────────┘ -
You answer questions
Select options or provide details.
-
Claude creates a specification
Based on your answers:
# Rate Limiting Specification## Scope- All authenticated endpoints- 100 requests per minute per user- 1000 requests per minute per IP## Technical Approach- Redis for distributed rate limiting- Use redis-py with sliding window algorithm- Return 429 with Retry-After header## Files to Modify- app/middleware/rate_limit.py (create)- app/routes/*.py (add decorator)- requirements.txt (add redis-py)## Acceptance Criteria- Exceeding limit returns 429- Retry-After header accurate- Tests for limit enforcement -
You approve or refine
> this looks great, implement it# or> change the limit to 50 requests per minute, then implement -
Implementation begins
Claude switches to normal mode and executes the plan.
When to Use Plan Mode
Section titled “When to Use Plan Mode”✅ Perfect For:
Section titled “✅ Perfect For:”New features with multiple components
> add a complete user notification system> [plan mode helps define: types, delivery, preferences, storage]Architecture decisions
> should we use a queue for background jobs or handle them inline?> [plan mode explores tradeoffs]Features with unclear requirements
> add analytics tracking> [plan mode clarifies: what events? which service? PII concerns?]Complex integrations
> integrate with Stripe for payments> [plan mode defines: products, webhooks, error handling]Anything involving money, auth, or data
> add payment processing> [plan mode ensures security and compliance considerations]❌ Overkill For:
Section titled “❌ Overkill For:”Simple, well-defined tasks
> add a comment explaining this function# Don't need plan mode—just do itQuick fixes
> fix the typo in the error message# Planning wastes timeOne-line changes
> rename this variable# Too simple for planningPlan Mode vs Normal Mode
Section titled “Plan Mode vs Normal Mode”| Aspect | Normal Mode | Plan Mode |
|---|---|---|
| Focus | Execute immediately | Plan thoroughly first |
| Questions | Maybe asks 1-2 | Comprehensive interview |
| Output | Code changes | Specification document |
| Speed | Faster start | Slower start, faster finish |
| Best for | Clear requirements | Unclear requirements |
| Iterations | Costly (rewrites code) | Cheap (just updates spec) |
Plan Mode + Thinking Modes
Section titled “Plan Mode + Thinking Modes”Plan mode and thinking modes work together:
You: [in plan mode] add a caching layer
Claude: <thinking>Complex feature. Need to clarify:- What to cache (API responses? Database queries?)- Cache backend (Redis? In-memory?)- Invalidation strategy- TTL requirements</thinking>
Let me ask some questions to understand your caching requirements:
┌─────────────────────────────────────────┐│ What should be cached? ││ ││ ☐ API response data ││ ☐ Database query results ││ ☐ Computed values ││ ☐ Static assets │└─────────────────────────────────────────┘The thinking helps Claude ask better questions.
The Spec-First Workflow
Section titled “The Spec-First Workflow”A powerful pattern for complex features:
-
Planning session (plan mode)
Terminal window claude# Enable plan mode: Alt+M> add user preferences feature# [answer clarifying questions]> save the spec to docs/specs/user-preferences.mdexit -
Implementation session (normal mode)
Terminal window claude> implement the spec in docs/specs/user-preferences.md# [Claude implements following the spec] -
Testing session (normal mode)
Terminal window claude> write comprehensive tests for the user preferences feature> use the spec in docs/specs/user-preferences.md for test cases
Each session gets fresh context focused on its phase.
AskUserQuestion Tool
Section titled “AskUserQuestion Tool”In plan mode, Claude uses the AskUserQuestion tool to present structured questions.
Question Types
Section titled “Question Types”Single choice:
┌─────────────────────────────────────────┐│ Which database? ││ ││ ○ PostgreSQL ││ ○ MySQL ││ ○ MongoDB ││ ○ SQLite │└─────────────────────────────────────────┘Multiple choice:
┌─────────────────────────────────────────┐│ Which features needed? (select all) ││ ││ ☐ User registration ││ ☐ Password reset ││ ☐ Email verification ││ ☐ Two-factor authentication │└─────────────────────────────────────────┘Open-ended:
┌─────────────────────────────────────────┐│ What's your email provider? ││ ││ Your answer: _______________________ ││ ││ (e.g., "SendGrid", "AWS SES") │└─────────────────────────────────────────┘Effective Planning Sessions
Section titled “Effective Planning Sessions”1. Start Broad
Section titled “1. Start Broad”> add a recommendation engine
# Good: Let Claude explore the problem space# Claude will ask about: algorithms, data sources, performance, etc.2. Provide Context
Section titled “2. Provide Context”> add search functionality> context: Django REST API, PostgreSQL database, 100k products> users want to filter by price, category, brandContext helps Claude ask better questions.
3. Think Out Loud
Section titled “3. Think Out Loud”> add analytics> I'm thinking either Google Analytics or a self-hosted solution> concerned about: GDPR compliance, cost, data ownershipSharing your thoughts helps Claude understand priorities.
4. Ask for Tradeoffs
Section titled “4. Ask for Tradeoffs”> compare approaches for implementing real-time chat> I need to understand: complexity, scalability, cost5. Request Examples
Section titled “5. Request Examples”> show me example API requests and responses in the spec> include: happy path, error casesRefining Plans
Section titled “Refining Plans”Plans rarely perfect on the first try. Iterate:
Claude: [presents plan]
You: this looks good but change the caching TTL to 1 hour instead of 5 minutes
Claude: Updated the spec with 1-hour TTL. Anything else?
You: also add a manual cache invalidation endpoint
Claude: Added POST /api/admin/cache/clear to the spec. Ready to implement?
You: yes, proceedSaving Specifications
Section titled “Saving Specifications”Always save good specs:
> save this specification to docs/specs/notification-system.mdBenefits:
- Reference during implementation
- Share with team for review
- Use in future sessions
- Document decisions
Common Mistakes
Section titled “Common Mistakes”❌ Using Plan Mode for Everything
Section titled “❌ Using Plan Mode for Everything”# Overkill> [plan mode] add a comment to this functionFix: Reserve plan mode for genuinely complex work.
❌ Insufficient Context
Section titled “❌ Insufficient Context”# Too vague> add authentication
# Better> add authentication> context: Flask API, PostgreSQL, 5000 daily users> must support: password login, OAuth, API keys❌ Skipping the Spec Save
Section titled “❌ Skipping the Spec Save”# Bad: Spec only exists in conversation> [plan mode creates great spec]> implement it# [spec lost if session crashes]
# Good: Save it> save the spec to docs/specs/auth.md> implement it❌ Not Reviewing Before Implementation
Section titled “❌ Not Reviewing Before Implementation”# RiskyClaude: [30-page spec]You: implement it# [hope everything was correct]
# SaferClaude: [presents spec]You: let me review...You: section 3 needs adjustmentClaude: [updates]You: now implementPlan Mode + Other Features
Section titled “Plan Mode + Other Features”With Task Tracking
Section titled “With Task Tracking”> [plan mode] add user dashboard
[Claude creates spec and task breakdown]
Specification created. Implementation will involve:
○ Create dashboard layout component○ Add user statistics API endpoint○ Implement data visualization○ Add real-time updates via WebSocket○ Write tests○ Update documentation
Shall I proceed?With Subagents
Section titled “With Subagents”> [plan mode] refactor the authentication system
[After planning]
I can use subagents to parallelize the implementation:- Subagent 1: Refactor backend auth- Subagent 2: Update frontend auth flow- Subagent 3: Update tests
Proceed with parallel implementation?Exiting Plan Mode
Section titled “Exiting Plan Mode”Three ways to exit plan mode:
-
Approve the plan
> this looks good, implement it# Claude switches to normal mode and implements -
Keyboard shortcut
Alt+M / Option+M to cycle back to normal mode -
Explicit command
> switch to normal mode
Summary
Section titled “Summary”Plan mode is for thinking before doing:
- Activate with Alt+M or explicit request
- Claude asks clarifying questions (AskUserQuestion tool)
- Creates detailed specifications
- You approve, refine, or reject
- Then implementation begins
Use plan mode when:
- Requirements are unclear
- Multiple approaches possible
- Decisions have significant impact
- Want to review before committing
Skip plan mode when:
- Task is simple and clear
- Quick fixes or one-liners
- Exploring/prototyping