# Delegate one Claude Code coding task from Opus to Haiku and verify the result
> A documented Claude Code workflow for sending one bounded coding change from an Opus parent to a project Haiku subagent, checking the actual model and diff, and interpreting usage without assuming a saving.
By BIG CHANGE Editorial
Published: 2026-10-20T10:17:38.691Z
Updated: 2026-10-20T10:17:38.691Z
Canonical: https://bigchange.ai/blog/claude-code-opus-haiku-subagent-coding-guide

AI-generated conceptual illustration by BIG CHANGE.
Claude Code can give a project subagent its own model and tools while the main conversation handles planning and review. For one authorized repository change, that lets an Opus parent send a bounded implementation step to Haiku. The useful result is a checked code change and a record of which models ran. A cheaper model setting alone does not establish a saving.
## The big change
- **What changed:** A project agent file can request `model: haiku` for a named coding worker while the parent session uses Opus.
- **Why it matters:** The parent can review a smaller worker task, but the developer still decides whether the diff meets the original acceptance check.
- **What to watch:** Model overrides, organization policy, permissions, review and retry work can change the actual model and total usage. Verify them before claiming a cost benefit.
## Start with a task you already own
You need an owned Git repository, permission to change it, Claude Code access to both model families, and one authorized change small enough to assess from its diff. Write down the starting commit, the files or behavior in scope, the existing acceptance command, and what a passing result means. Use a clean checkout for the run. The command must come from your project; this guide cannot supply a meaningful test for an unknown repository.
Check `claude --version`, your provider and billing arrangement, and the effective model restrictions before starting. On the Anthropic API, the current `opus` and `haiku` aliases resolve to Opus 5.5 (`claude-opus-5-5`) and Haiku 5.5 (`claude-haiku-5-5`); that pair needs Claude Code v2.1.293 or later. Other providers may map the same aliases to earlier generations. An organization's `availableModels` policy may block or substitute a selection. Use `/model` in the main session and record the exact parent model that appears. Decide your authorized budget and inspect the actual account or provider controls; a prompt to the model is not a guaranteed spending cap. [Anthropic's model configuration](https://code.claude.com/docs/en/model-config) documents the current mappings and restrictions.
## 1. Define a project Haiku worker
Create a uniquely named file such as `.claude/agents/bounded-code-worker.md` in the project, review it, then start the Opus parent with `claude --model opus` or select Opus using `/model`. This example is a worker definition, not a test task:
```markdown
---
name: bounded-code-worker
description: Implements one explicitly bounded, authorized repository change and reports the diff and checks for parent review.
model: haiku
tools: Read, Glob, Grep, Edit, Bash
permissionMode: default
---
```
Append this plain-language system prompt immediately after the closing `---` in the agent file: Implement only the task and file scope passed by the parent. Before editing, inspect the relevant code and the stated acceptance check. If the task, permission, or required input is missing, stop and report the gap. Make the smallest relevant change. Run the original check when permitted; report its exact command and result. Return the files changed, the diff's purpose, any remaining failures, and any work you could not verify. Do not commit, publish, deploy, or expand the task without explicit authority.
The `tools` list makes tools available; it does **not** confine reads or shell commands to the stated paths. Check effective project and organization permissions, especially shell access, before delegation. Keep the parent in Manual/default permission mode for this recipe: Anthropic documents that a parent in `acceptEdits`, `auto`, or `bypassPermissions` overrides the worker's `permissionMode`. If this is the first file in a newly created agents directory, restart Claude Code if the agent does not appear. [The subagent manual](https://code.claude.com/docs/en/sub-agents) describes these controls.
An optional `isolation: worktree` gives the worker a separate checkout. Its documented starting point is the repository's default branch, which may differ from the parent's current commit. Check that starting revision against your recorded task base before using or comparing its changes. A clean, authorized checkout is still required for the original acceptance check.
## 2. Delegate, inspect, then accept or reject
Give the parent an instruction tied to the real task, using your own file boundary and check command:
> Plan this authorized change briefly. Delegate only the specified implementation to `bounded-code-worker`. Keep the original acceptance criteria and final review with you. After the worker returns, show me its exact diff and check result. Do not accept or expand the change until I have reviewed them.
While the worker runs, open `/tasks` and record the model shown on its row. That is the runtime check; the word `haiku` in an agent file or prompt is only a request. Claude Code v2.1.242 or later shows the running model there. A completed background task remains in `/tasks` for about 30 seconds, so inspect it promptly and retain its transcript. If the row is missed, mark model verification incomplete instead of inferring it from the file.
Read the actual diff, inspect each changed file, and run the **original** acceptance command yourself in the owned checkout. Add targeted checks when the change warrants them. Accept the result only if the behavior, scope and checks match the task. If a worker stops early or returns partial work, inspect what it changed before a continuation or repair. If it used a separate worktree, review those changes before incorporating them into the main checkout.
For a related approach to checking one repository failure with an AI assistant, see our [AI Goal repair and verification guide](https://bigchange.ai/blog/ai-goal-failing-repository-check-guide). That workflow does not configure the Opus-to-Haiku delegation used here.
If `/tasks` shows a different model or a substitution warning, check the invocation's model argument, agent frontmatter, `CLAUDE_CODE_SUBAGENT_MODEL`, and the managed model list. In current Claude Code, an invocation model takes precedence over frontmatter, then the environment default, then the parent model; before v2.1.251 the environment setting took precedence. `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1` (v2.1.257+) can override the definition, and an installed mod's `agent.spawn` hook can replace the invocation model. Correct the actual source of the override or stop the run. Do not relabel a non-Haiku result as Haiku.
## 3. Record usage without inventing a saving
Take `/usage` readings around this controlled session. Record per-model input, output and cache tokens, the displayed cost estimate, the provider or plan, the accepted diff, the original check result, and the review or rework required. The Session block aggregates the whole session by model; it is not a precise invoice for this named worker. Plan attribution percentages are approximate local day or week history, not a measurement of this one task. For an API account, the Claude Console is the authoritative billing source. For a subscription, the session dollar estimate is not an incremental bill. Mark a last-known usage display as stale.
To claim that delegation saved money on **this** task, compare it with a separately authorized single-model run from the same clean starting revision, using the same task and acceptance criteria. Count parent planning and review, worker calls, retries and any rework, and compare only accepted outcomes. One pair of runs remains a task-specific observation. Without such a baseline, report the verified model route and code result; savings are unknown. [Anthropic's cost guide](https://code.claude.com/docs/en/costs) explains the usage display and billing limits.
This procedure is based on current documentation, not a BIG CHANGE run of Claude Code or a measured task. Do not send code or secrets that your organization has not approved for its configured provider. The route here uses Claude Code's native Opus and Haiku selection; another model provider would need a separately specified gateway or orchestration workflow and its own checks.
## Sources & further reading
- [Anthropic, Create custom subagents](https://code.claude.com/docs/en/sub-agents) — project agent files, model precedence, `/tasks`, permissions and worktree behavior. Current manual checked 20 October 2026; it documents the feature, not the outcome of this guide's unrun example.
- [Anthropic, Model configuration](https://code.claude.com/docs/en/model-config) — current aliases, provider differences, version requirements and managed model controls. Confirm your installed version and provider at use time.
- [Anthropic, Manage costs effectively](https://code.claude.com/docs/en/costs) — `/usage` fields, estimates and subscription versus API billing. It does not establish a saving for this task.
- [Anthropic, Configure permissions](https://code.claude.com/docs/en/permissions) — effective tool permission rules that require inspection before a code-changing worker runs.
## Sources
- [Create custom subagents — Claude Code Docs](https://code.claude.com/docs/en/sub-agents) — Primary product manual for project agent files, frontmatter, model precedence and overrides, /tasks readback, permission inheritance and worktree behavior. It does not verify this guide's unrun task or saving.
- [Model configuration — Claude Code Docs](https://code.claude.com/docs/en/model-config) — Primary source for current Opus and Haiku aliases and IDs on the Anthropic API, different provider mappings, version minima and managed availableModels restrictions. A reader must check actual local resolution.
- [Manage costs effectively — Claude Code Docs](https://code.claude.com/docs/en/costs) — Explains /usage session token and estimate fields, local plan attribution, stale displays, subscription versus API billing and Console as billing authority. It does not yield a precise named-worker invoice or a measured task saving.
- [Configure permissions — Claude Code Docs](https://code.claude.com/docs/en/permissions) — Explains effective shell and file permission rules relevant to a code-changing worker. A subagent tool list alone is not a filesystem path boundary.
The BIG CHANGE newsletter
The big picture. At your pace.
Recent stories on AI and robotics, the shifts worth watching and practical ideas to use. Choose a daily briefing, weekly digest or monthly perspective.
Next scheduled send (UTC): . Your first edition arrives at the next scheduled send after you confirm.
Your privacy, your choice.
Necessary storage supports site security and remembers your choices. Optional Google Analytics stays off until you allow it. You can read every story with necessary storage only. Privacy details