Claude Code workflow: Haiku filters, Sonnet refactors, Opus ships
Reserve expensive models for reasoning and cheap ones for filtering, with deterministic code handling simple routing and frontier models called only when reasoning is needed.
Your most expensive model shouldn't be doing your cheapest work. This Claude Code workflow splits the job across Opus 5.5, Sonnet 5.5, and Haiku 5.5: → Opus plans and synthesizes the final PR → Sonnet handles precise refactors in isolated worktrees → Haiku filters candidates at 340 tok/s The clever part? Haiku steps in at 3 critical bottlenecks: → Before dispatch: Scans the codebase in parallel and extracts AST candidates without bloating context. → During validation: Catches malformed tool calls and false positives before Sonnet touches them. → Before synthesis: Checks that every candidate matches the target JSON schema. Haiku filters. Sonnet refactors. Opus ships. Here's how to set up the full workflow in Claude Code: Let Opus plan. Use high effort to draft workflow scripts in .claude/workflows/. Fan out Haiku. Run parallel AST sweeps across target files at low effort. Validate candidates. Use schema checks to filter false positives before generating patches. Let Sonnet refactor. Run verified changes in isolated Git worktrees to avoid edit conflicts. Keep intermediate state out of context. Use runtime variables to avoid carrying unnecessary data between agents. Cache prompt prefixes. Configure a 1-hour prompt cache TTL to reduce redundant processing where supported. The same principle applies to agent frameworks like Jev: use deterministic code for simple routing decisions, and call frontier models only when reasoning is actually needed. Author on high. Refactor on medium. Let Haiku handle the filtering. Want to try it? Paste this prompt into Claude Code: Configure my Claude Code workspace for dynamic workflows. 1. Audit ~/.claude/workflows and .claude/workflows. - Draft workflows for codebase audits, parallel migrations, and schema validation. - Use Haiku at low effort for AST sweeps. - Use Sonnet at medium effort for refactoring. - Run workers in isolated Git worktrees. 2. Review ~/.claude/settings.json for supported workflow settings. - Configure the main session for high effort. - Review prompt caching settings. - Verify all model names and configuration keys. 3. Configure runtime controls where supported. - Review automatic continuation behavior at usage limits. - Review prompt-prefix staggering for parallel workers. - Set a warning threshold for large agent workflows. 4. Add a rule to ~/.claude/CLAUDE.md: All multi-file refactors must pass a schema validation check before merging. Show me every proposed change as a diff first. Do not edit any files until I approve. Don't throw your most expensive model at every step. Give each model a specific job and let the workflow handle the rest. https://x.com/mirku21/status/2108663944680255862/video/1
This post quotes another post: x.com/arindam_1729/status/2108226317825302863