Wink Pings

The Most Expensive Waste in Claude Code: Making Opus Do grep Work

Split Sonnet, Haiku, and Opus into lead coder, search worker, and advisor to save tokens and context. Includes xsmryze's config tree, key points from Anthropic's subagent docs, and comment-section skepticism about JEV and Haiku auditing.

By default, Claude Code uses one model from beginning to end. Writing code, searching the repository, reading logs, and reviewing diffs are all crammed into the same context. As soon as a task gets complex, the context is filled first with grep results and test logs; no matter how strong the model is afterward, it easily ends up making judgments in a garbage heap.

xsmryze on X offered a more economical approach: split models by task. The startup command is:

claude --model sonnet --advisor opus

The division of labor is roughly like this:

  • Sonnet 5.5 runs the main session, writes code, and applies fixes.
  • Haiku 5.5 serves as parallel subagents: search maps the repository, grep finds call sites, and audit checks diffs in a temporary worktree.
  • Opus 5.5 acts as advisor, stepping in only at three moments: before the plan is locked, when the same error appears twice, and before completion is declared.

The original post compresses this division of labor into one sentence: Sonnet builds. Haiku swarms. Opus reviews.

This setup is backed by official mechanisms. In Anthropic's Claude Code docs, subagents are designed exactly for this scenario: each subagent has an independent context window, independent system prompt, tool permissions, and model settings. High-noise operations are handed off to subagents, and the main session only gets summaries. The docs also provide configuration options such as the model field, worktree isolation, and CLAUDE.md rules. Link at the end.

xsmryze's practical prompt is roughly: use Sonnet for the main session and Opus as advisor; create three Haiku subagents—search, grep, and audit—in .claude/agents; set audit to isolation: worktree to avoid touching the working branch during checks; add a rule in CLAUDE.md to hand repository search and test runs to Haiku subagents; route quick deterministic branches through JEV. Look at the diff first; don't change things directly.

Two points need to be made clear.

JEV is not an official Anthropic component. In the comments, Peter Grish directly pointed out that it is a third-party router, not something from Anthropic. You can write JEV into your workflow, but don't treat it as a built-in Claude Code capability.

Haiku auditing diffs is also disputed. Someone in the same comment section questioned: reviewing a diff is exactly the step that needs a large model. xsmryze's plan is for Haiku to do the first layer of checking, and for Opus to look at the synthesized diff before signing off. Whether this division is sufficient depends on the repository and the type of change; it can't be generalized.

There is also a cost issue. In the comments, First Commit Lab asked directly: saving tokens does not equal saving total cost; handoff and review also need to be counted. Multi-model division reduces invalid context, but increases the number of coordination steps. If the task is very small, splitting models is actually more expensive.

Suitable scenarios: large repositories, lots of searching, long test logs, and a main session that is often overwhelmed by tool output. First throw high-noise operations like search and testing to Haiku subagents, leaving only decisions and code changes in the main session. Once this step is stable, add the Opus advisor and finer routing.

Don't treat org charts as magic. One model doing everything gets overloaded, and a dozen agents all reporting to you also turns you into a human router. First measure where your tokens are being spent, then decide whether to split. Saved tokens don't automatically turn into profit, but at least they won't leave Opus swimming in grep results.

References:

发布时间: 2026-11-06 23:34