Claude Code 三模型分工:Sonnet 写码、Haiku 搜索、Opus 审 diff
用环境变量让 Sonnet 5.5 主跑、Haiku 5.5 并行搜仓库、Opus 5.5 只在关键节点审 diff;作者称微分支决策交给 JEV 毫秒级路由。
THIS IS A REAL F*CKING GOLDMINE Anthropic just shared one of the best tricks for Claude Code The idea: run Sonnet 5.5, Haiku 5.5 and Opus 5.5 together, each one doing only the job it's best at Better output and way fewer tokens: every task lands on the right model You just start Claude Code like this: CLAUDE_CODE_SUBAGENT_MODEL=haiku claude --model sonnet here's how it splits: → Sonnet 5.5 runs the main session, writes the code and applies the fixes → Haiku 5.5 swarms the repo in parallel: search, grep, docs and test audits, each in its own context → Opus 5.5 sits in its own architect subagent for the big decisions and signs off on the diff → you stop burning Opus on routine work and stop flooding the main session with raw logs Opus only steps in at three moments: → before a plan locks → when the same error hits twice → before calling it done (signing off on the git diff) Sonnet builds, Haiku swarms, Opus reviews JEV engineering is the same move one layer down: the forks that need no thinker (which agent, which tool, retry or stop) go to JEV in milliseconds, and the big models only see the ones that split the full tree > Sonnet 5.5 runs the main session and writes the code > search maps the repo on Haiku 5.5 (read-only) > grep finds call sites on Haiku 5.5 (own context, only the summary comes back) > audit checks diffs on Haiku 5.5 in a temporary worktree (isolation: worktree) > architect runs on Opus 5.5 (its model: opus beats the haiku default), reviews the final diff > JEV routes micro-forks in milliseconds paste the tree and this prompt into Claude Code ↓ "Reconfigure my Claude Code setup around this tree: 1. Run the main session on Sonnet 5.5 and set CLAUDE_CODE_SUBAGENT_MODEL=haiku 2. Create four subagents in .claude/agents/: search (maps the repo), grep (finds call sites) and audit (checks diffs) on Haiku 5.5, plus architect with model: opus 3. Set isolation: worktree on audit so it never touches my working branch 4. Add one rule to CLAUDE.md: send every repo search and test run to a Haiku 5.5 subagent, and call architect before a plan locks, after the same error twice and before done 5. Route fast deterministic forks (tool choice, path selection, retries) through JEV Show me every change as a diff first. No edits until I say go" ↳ http://code.claude.com/docs/en/sub-agents save it, you'll need it
这条是引用着另一条写的:x.com/skunzu/status/2111186725548511689