Plan Mode and Extended Thinking
Plan Mode activates Claude's Extended Thinking capability, allowing it to reason through complex problems before taking action.
What is Extended Thinking?
Extended Thinking gives Claude more "thinking time" to:
- Analyze complex requirements
- Consider multiple approaches
- Plan multi-step implementations
- Identify potential issues upfront
Activating Extended Thinking
Use these magic words in your prompts:
| Keyword | Thinking Time |
|---|---|
think | ~10 seconds |
think hard | ~30 seconds |
ultrathink | ~60+ seconds |
Example:
> think hard about how to refactor our authentication
> system to support OAuth2 and SAML
The Planning Process
When you activate Plan Mode, Claude will:
- Analyze the current state
- Identify requirements and constraints
- Design an implementation strategy
- Create a step-by-step plan
- Present the plan for your approval
- Execute upon confirmation
When to Use Plan Mode
Complex Refactors
> ultrathink about migrating from REST to GraphQL
Architecture Decisions
> think hard about the best way to implement
> real-time notifications in our app
Debugging Complex Issues
> think about why our memory usage keeps increasing
> after processing large files
Multi-service Changes
> ultrathink about adding a new payment provider
> that needs changes to frontend, backend, and database
Best Practices
Provide Context
Extended Thinking works best with context:
> We have a Next.js app with Prisma ORM and Redis cache.
> think hard about implementing a new caching strategy
> for user profiles that invalidates properly.
Review the Plan
Always review the plan before execution:
Claude: Here's my plan:
1. Create new cache invalidation service
2. Update user profile queries
3. Add Redis pub/sub for real-time invalidation
4. Update tests
> Approve? (y/n/e)
Iterate on Plans
You can refine the plan:
> Good plan, but also consider backwards compatibility
> with the mobile app v1.x
When Claude Gets Stuck
Everyone faces this: Claude tries to fix something 3 times and each fix generates a new error. Here's how to break out of the loop:
Signs Claude Is Stuck
- Same error appears after each "fix"
- Claude starts undoing changes it already made
- Responses become repetitive
- Claude suggests things you already tried
Recovery Protocol
Step 1: STOP - Don't keep approving
# Press Esc to stopStep 2: Ask for root cause analysis
STOP. You've tried to fix this 3 times.
ultrathink the ROOT CAUSE - not symptoms. What assumption are we making that's wrong?Step 3: If still stuck, reset context
/clear
# Start fresh with a new problem descriptionStep 4: If nothing works, break it down
Let's break this into smaller parts:
1. First, just show me where the error originates (no fix yet)
2. Then explain why the previous fixes didn't work
3. Then propose ONE minimal fixWhen to Code It Yourself
Sometimes the answer is: code it yourself. Signs:
- Claude has made 5+ attempts without progress
- The fix is obvious but Claude doesn't see it
- It's faster to do manually (2-3 lines)
No shame in coding. Claude is a tool, not a replacement.
Cost of Extended Thinking
| Level | Reasoning Tokens | Approx Cost | Justified When |
|---|---|---|---|
| Normal | 0 | Base | Simple edits, questions |
| "think" | 2-5k | +$0.01-0.02 | New features |
| "think hard" | 5-10k | +$0.03-0.05 | Complex bugs, security |
| "ultrathink" | 10-16k+ | +$0.05-0.10 | Critical architecture |
Rule: If ultrathink saves you 30 minutes of debugging, that $0.10 is the best investment.
For Teams: When to Scale Plan Mode
If you lead a team, consider these patterns:
Mode Policies by Seniority
| Role | Default Mode | Auto Mode | Plan Mode |
|---|---|---|---|
| Junior | Always approve | Supervised only | Required for features |
| Mid | Use judgment | On feature branches | For changes >5 files |
| Senior | Free | Free | For architecture |
When to Require Plan Mode
Have your team use Plan Mode mandatorily for:
- Features touching >10 files
- Changes to core modules (auth, payments, etc.)
- Any data migration
- Architectural decisions
The plan can be reviewed in PR as decision documentation.
Next Steps
In the next module, you'll learn about CLAUDE.md and memory systems for persistent context.