Skip to content

Use Opus for planning and Sonnet for implementation in Claude Code

pattern

Using expensive models for all coding tasks wastes money; using cheap models for planning produces poor architecture

claude-codeopussonnetcost-optimizationworkflow
0 views

Problem

Claude Code defaults to Sonnet for most tasks, with Opus available for deeper thinking. Running Opus for everything burns through your usage limits quickly. Running Sonnet for everything means architectural decisions and complex debugging get shallow treatment. You need a strategy that matches model capability to task complexity.

Solution

Step 1: Use Opus for planning and architecture

Trigger extended thinking for planning tasks with specific phrases:

# In Claude Code, use thinking triggers:
"think deeply about how to implement a real-time notification
system for our app. Consider the existing database schema,
WebSocket infrastructure, and permission model."

# Thinking budget phrases (increasing depth):
# "think" < "think hard" < "think harder" < "ultrathink"

Step 2: Get Opus to produce atomic implementation tasks

# Ask Opus to break the plan into discrete tasks:
"Based on your analysis, create a numbered list of implementation
tasks. Each task should be completable in a single Sonnet session.
Include the specific files to modify and the changes needed."

Step 3: Switch to Sonnet for implementation

Execute each task with Sonnet, which handles straightforward implementation efficiently:

# Standard implementation prompts use Sonnet automatically:
"Implement task 1: Add the WebSocket connection handler
in src/server/ws.ts. Follow the pattern used in the existing
HTTP handler at src/server/api.ts."

Step 4: Return to Opus for review and debugging

# When you hit a complex bug or need architectural review:
"think hard about why the WebSocket connection drops after
30 seconds. Review the heartbeat implementation and the
nginx proxy configuration."

Task-to-model mapping guide:

USE OPUS (think/ultrathink):
  - Architecture decisions
  - Complex debugging across multiple files
  - Planning multi-step features
  - Reviewing security implications
  - Refactoring strategy

USE SONNET (default):
  - Implementing defined tasks
  - Writing tests for existing code
  - Adding new endpoints following existing patterns
  - CSS/styling changes
  - Documentation updates

Why It Works

Opus has stronger reasoning capabilities for tasks that require holding multiple concerns in mind: architecture, cross-service dependencies, and complex debugging. Sonnet is faster and uses fewer tokens for well-defined implementation tasks where the path is clear. By routing tasks based on complexity, you get Opus-quality planning with Sonnet-level throughput and cost. The Claude Code Max plan ($200/month) gives effectively unlimited usage of both models, making this a workflow optimization rather than a strict cost constraint.

Context

  • Claude Code automatically selects Sonnet by default and escalates to Opus when thinking triggers are used
  • The Max plan ($200/month) provides the best value for heavy usage of both models
  • The Pro plan ($20/month) gives access to Sonnet but not Opus in Claude Code
  • This pattern mirrors how senior engineers delegate: architect the solution yourself, then hand clear specs to the team
  • Combine with the Google AI Studio 1M context pattern for even better planning on large codebases
  • Track your Opus vs Sonnet usage in the Claude dashboard to optimize the split over time
About this share
Contributormblode
Repositorymblode/shares
CreatedFeb 10, 2026
View on GitHub