{"version":"2.1.336","anchor":"subagent-small-model-block-via-claude-code-subagent-no-small","canonical_anchor":"new-env-var-claude-code-subagent-no-small-models-and-agent-m","heading":"New CLAUDE_CODE_SUBAGENT_NO_SMALL_MODELS keeps subagents off Sonnet and Haiku","tier":"use","area":"Subagents","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/subagent-small-model-block-via-claude-code-subagent-no-small","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### New CLAUDE_CODE_SUBAGENT_NO_SMALL_MODELS keeps subagents off Sonnet and Haiku\n\nA new `CLAUDE_CODE_SUBAGENT_NO_SMALL_MODELS` variable stops subagents running on Sonnet or Haiku, moving them to a larger model or refusing to start\n\n**Unclear.** Apart from setting `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`, it is not clear which sessions this variable applies to.\n\n**What**\n\nA subagent is a helper Claude starts to work on part of a task, which can run on its own model. A new environment variable (a named setting a program receives at start), `CLAUDE_CODE_SUBAGENT_NO_SMALL_MODELS`, keeps subagents off the smaller Sonnet and Haiku models. It did not exist in v2.1.335.\n\n- When it applies, choosing a subagent's model refuses Sonnet and Haiku and falls back to Opus or to the model the session inherited.\n\n- If no such model is available, the subagent does not start, with the error 'The subagent was not started: no model larger than Sonnet is available for it.'\n\n- It applies only in a certain kind of session or when `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST` is set.\n\n- The model choices offered for an agent leave out sonnet and haiku, with the note: \"Sonnet and Haiku are not offered on this session: an agent that would run on one runs on a larger model, usually Opus.\"\n\n- The variable is on Claude Code's list of variable names next to the other `CLAUDE_CODE_SUBAGENT_*` variables, `CLAUDE_CODE_REQUIRED_PLUGINS_HOLD` and `CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY`.\n\n**Why**\n\nPrograms that embed Claude Code can make sure subagents never quietly run on a small model, and see a clear error when no larger one is available.\n\n- Area: Subagents\n- Names: `CLAUDE_CODE_SUBAGENT_NO_SMALL_MODELS`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: both\n- Heads-up: no"}