Sonnet Builds, Opus Advises: A Shell Alias for Claude Code's Advisor Tool
Claude Code's advisor tool lets a cheaper main model ask a stronger one for a second opinion at the moments that matter. Here's the one alias I use to run Sonnet with Opus on call.
Today I learned about Claude Code’s advisor tool. Your main model does the work, and when it hits a hard decision, it asks a stronger model for a second opinion.
The advisor is a server-side tool. The main model decides when to call it, usually before it commits to a plan, when the same error shows up twice, and before it says it’s done. The advisor reads the whole conversation, every tool call and result included, and sends back advice. It never touches files or runs commands.
What makes this interesting is the cost. Most turns in a long task are boring: read a file, run a test, fix a typo. Only a few turns decide whether the task actually works out. So Sonnet can do the boring parts, and I only pay Opus rates for the few turns that matter.
Read each factory from top to bottom. Your prompt turns into a stream of turns, the main model takes them, and finished work lands in the silo. Some decision points are traps (red dot): plans that look right but aren’t. Press Tour for a walkthrough.
First the normal way: Opus does every turn. It spots the traps, but you pay Opus prices for every turn, including the boring ones. It also reads every file itself, one after another, so each search blocks it. Watch the gold $ above the Opus machine.
The cheap way: Sonnet does the work, and every search fans out to four Haiku subagents that dig through the repo at the same time. Watch the four drills on the left light up together, each billing about a tenth of a cent (green $). Sonnet only reads their short summaries and keeps building in the meantime. This has the lowest cost per task, but Sonnet decides the traps alone. Some ship as bugs and come back as rework.
The advisor way: same Sonnet and four Haiku lanes, but decision points branch off to the right to Opus. Opus catches the traps, so no bugs ship. Each advisor call is expensive, because Opus reads the whole session, but there are only a few. In this simulation it costs about a third less per task than Opus alone, and because the searches run in parallel, it finishes about 50% more tasks per minute. Compare Tasks / min with the first factory.
I already had cs to run Claude Code without permission prompts. Now I also have csad for the advisor setup:
alias cs="claude --dangerously-skip-permissions"
alias csad="CLAUDE_CODE_SUBAGENT_MODEL=haiku claude --dangerously-skip-permissions --model sonnet --advisor opus"
This gives me three roles:
- Sonnet is the main model. It writes the code and runs the tests.
- Haiku runs the subagents. Sonnet can spawn several at once, each searching a different corner of the repo in parallel, and gets back only short summaries. That keeps Sonnet’s context small and costs almost nothing.
- Opus is the advisor. It reviews the plan, the failures and the final diff.
When Claude asks the advisor, an Advising line shows up in the transcript. Press Ctrl+O to read what Opus said.
I found this through a viral post that recommended claude --advisor opus --subagents haiku. The --subagents flag doesn’t exist. To set the subagent model, use the CLAUDE_CODE_SUBAGENT_MODEL env var.
Key takeaways:
- The advisor must be at least as strong as the main model. Sonnet with an Opus advisor works. Opus with a Sonnet advisor doesn’t.
--advisorworks even thoughclaude --helpdoesn’t list it- Each advisor call re-reads the full transcript without caching, so calls get more expensive as the session grows
- To make Claude ask at a specific point, put it in your prompt: “consult the advisor before you commit to an approach”