selan.ai

Guide · Claude Code models

Which model does a Claude Code subagent run on, and how do you choose it?

A Claude Code subagent runs on the model of the conversation that starts it, unless something else names one. Claude Code takes the first of these: the model Claude passes when it starts the subagent, the model field in the subagent's file, CLAUDE_CODE_SUBAGENT_MODEL, then the parent's model. With CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1, one model runs every subagent. Through Selan, each alias runs on the company's own accounts.

main opus sonnet haiku

Which model does a subagent run on by default?

The parent conversation's model. Switch the session to Opus with /model before Claude delegates, and the subagents that inherit run on Opus too. The built-in subagents differ slightly:

SubagentWhat it doesModel
ExploreRead-only search of the codebaseThe parent's model. On a Fable session through a Claude subscription, a Console key or a gateway, it runs on the model the opus alias points to.
PlanRead-only research in plan modeThe parent's model
general-purposeMulti-step work that can edit filesThe parent's model, unless the model order below picks another
statusline-setupRuns when you type /statuslineSonnet
claude-code-guideAnswers questions about Claude CodeHaiku

On Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry or a Claude apps gateway, Explore stays on Fable when the session runs Fable. A nested subagent, one started by another subagent, inherits that subagent's model rather than the main conversation's.

How do you set a subagent's model?

Put a model line in the subagent's file, in .claude/agents/ for one project or ~/.claude/agents/ for all of yours:

---
name: test-runner
description: Runs the test suite and reports the failures. Use after a change.
tools: Read, Grep, Glob, Bash
model: haiku
---
Run the tests and report each failure with its file and line.

The value is an alias (sonnet, opus, haiku or fable), a full model ID such as claude-opus-5-5, or inherit. When several sources name a model, Claude Code takes the first:

  1. The model parameter Claude passes when it starts the subagent. It takes an alias only.
  2. The model field in the subagent's file, inherit included.
  3. The CLAUDE_CODE_SUBAGENT_MODEL environment variable.
  4. The main conversation's model, or the spawning subagent's for a nested one.
  • CLAUDE_CODE_SUBAGENT_MODEL alone does not move Explore or Plan. To run exploration on a cheaper model, define your own subagent named Explore with model: haiku; it replaces the built-in one.
  • An alias in the same family as the session keeps the session's version. On claude-opus-4-7, a subagent with model: opus runs on Opus 4.7 too. Name the full ID to run another version.
  • /tasks shows the model each subagent runs on, and its effort level if it has its own (Claude Code v2.1.242 and later).

What does running subagents on a smaller model save?

Each subagent sends its own requests, priced at its own model's rates. Anthropic's list prices per million tokens:

ModelInputOutput
Claude Fable 5.2$8$40
Claude Opus 5.5$4$20
Claude Sonnet 5.5$2$10
Claude Haiku 5.5$0.10$0.50

The Haiku 5.5 row is for prompts up to 100,000 tokens; above that, Haiku's rates are five times higher. On a subscription seat, a subagent's requests count toward the same usage limits as the main conversation.

The subagent's model sets what its searching and test runs cost, not the session's.

A smaller model brings its own limits. A subagent's context window is sized by its own model. A level picked with /effort does not carry over to a subagent on another model, so give it an effort field. Extended thinking follows the main conversation, and there is no per-subagent setting for it.

How does a team set one subagent model for everyone?

Set CLAUDE_CODE_SUBAGENT_MODEL and CLAUDE_CODE_SUBAGENT_MODEL_FORCE in the env block of a settings file. In managed settings it reaches every developer. It needs Claude Code v2.1.257 or later.

{
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "haiku",
    "CLAUDE_CODE_SUBAGENT_MODEL_FORCE": "1"
  }
}
  • Forced, it runs every subagent, teammate and workflow agent, Explore and Plan included. Claude Code ignores the model field in subagent files, and Claude cannot pass a model.
  • Two kinds still run on the parent's model: a fork of the conversation, and a skill that runs in a subagent with model: inherit.
  • An availableModels allowlist also covers subagents. When it blocks a subagent's model, Claude Code runs the newest permitted version of a blocked family alias, where the provider supports that, then CLAUDE_CODE_SUBAGENT_MODEL, then the parent's model. An interactive session warns when it substitutes.
  • A fallback chain covers subagents too (v2.1.247 and later). When a subagent's model fails over, it carries on with the first fallback that accepts the request.

Forcing one cheap model makes every subagent cheap, including a reviewer you wanted on Opus. A lighter hand is a project Explore and model lines in the files the repository shares.

What does Selan do with subagent models?

Selan is a hosted gateway that runs Claude Code and Codex on the accounts your company already pays for. Behind it, a subagent's model works as the steps above describe, on those accounts.

  • selan sets each alias to a model your company has switched on: opus to Claude Opus 5.5, sonnet to Sonnet 5.5, fable to Fable 5.2 and haiku to Haiku 5.5. A subagent with model: haiku runs on Haiku 5.5.
  • A model switched off is unreachable, whichever subagent names it, even with a full ID.
  • Logs name the agent that made each request, such as the main conversation, Explore or Plan, beside the model it ran on. selan turns on Claude Code's gateway hint headers for this. Claude Code never sends a custom subagent's own name.
  • A subagent's requests count toward the same limits: each person's spend limit and the effort limit an owner sets per model maker.

The model switches are listed in what an owner sets, and the models each provider serves are in providers. What a repository's sessions cost is in usage practices, and a limit per person is on spend limits per developer.

Start for free

Free for up to three seats, and the Free plan needs no card.

When is Claude Code's own setting the better answer?

For choosing the model, always: it is Claude Code that picks it, through the gateway or not. A model line per subagent file and a managed CLAUDE_CODE_SUBAGENT_MODEL cost nothing.

A gateway adds what Claude Code does not keep for a team: which agent spent what, one list of the models anyone may reach, and a limit per person. Claude Code's effort level covers the other setting a subagent carries, and choosing the models the picker shows covers the allowlist.

The short version

The subagent order, built-in models and settings are as Anthropic's subagent page and model configuration page (code.claude.com/docs/en/sub-agents and /model-config) stated them on 18 November 2026. They change with nearly every release: check the date before relying on them. The prices are Anthropic's list prices as Selan's model catalog held them on that date, and what Selan does is as its command line, control app and docs stated it then.