Skip to content
BENIBIX Learn

CLAUDE_CODE_SUBAGENT_MODEL_FORCE

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1

Set to 1, it puts one model on each helper.

Think of it like

It is like a rule that all the players wear one shirt. No one gets to pick.

Example

Emma's company caps cost by running all helpers on Haiku. With FORCE set, an agent file can ask for Opus and still get Haiku.

Why it matters

A team can be sure no helper runs on a costly model by mistake.

Definition

CLAUDE_CODE_SUBAGENT_MODEL_FORCE set to 1 puts the subagent model on each helper agent. It wins over a model Claude names. It also wins over the model in an agent's own file. That covers the Explore and Plan agents that come built in. It needs Claude Code 2.1.257 or later.

Example code

bash
export CLAUDE_CODE_SUBAGENT_MODEL=haiku
export CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1
claude
Run each helper on Haiku, no matter what.
With FORCE, the variable jumps to the top.

Common mistake

Setting FORCE alone. It forces the model the other variable names, so that one has to be set too.

Key takeaways

  1. 1
    Needs the model var. FORCE alone does nothing.
  2. 2
    Beats everything. Calls and agent files.
  3. 3
    Explore and Plan too. Built-ins included.

Compare