CLAUDE_CODE_SUBAGENT_MODEL_FORCE

環境変数

サブエージェント、エージェントチームのチームメイト、およびワークフロー エージェントのデフォルト モデルを設定します。別途モデルが割り当てられていない場合に使用されます。エイリアス(haiku など)または完全なモデル名を受け付けます。

使い方・用途

  • サブエージェントやチームメイトに対して、プロジェクト全体で一貫したモデルを強制的に適用する
  • エージェント定義の model フィールドや個別の起動時の指定よりも優先される
  • v2.1.251 以前では、個別の起動時の指定やエージェント定義の model フィールドを上書きしていましたが、現在はそれらよりも優先されます
英語原文

The default model for subagents, agent team teammates, and workflow agents that aren't assigned a model another way. Accepts an alias such as haiku or a full model name. Two sources take precedence over it: a model Claude passes when it spawns the agent, and a model field in the agent's definition, including inherit. To change that, set CLAUDE_CODE_SUBAGENT_MODEL_FORCE. See Choose a model for the full order. Setting it to inherit is the same as leaving it unset. Before v2.1.251, this variable overrode both the per-invocation model and the definition's model field

関連ドキュメント

関連する変更履歴

v2.1.285(1件)

[VSCode] エージェントマップが、サブエージェントのモデルをセッションのモデルで表示していた問題を修正した。実際に実行されたモデル(例: CLAUDE_CODE_SUBAGENT_MODEL_FORCE やエージェント自身の model)を表示するようにした。
英語原文を表示
[VSCode] Fixed the agent map labeling a sub-agent with the session's model instead of the model it actually ran on (e.g. under CLAUDE_CODE_SUBAGENT_MODEL_FORCE or an agent's own model)

関連ドキュメント

v2.1.257(1件)

CLAUDE_CODE_SUBAGENT_MODEL_FORCE を追加した。これを設定すると CLAUDE_CODE_SUBAGENT_MODEL(またはメインモデル)がすべてのサブエージェントに適用され、スポーン単位やエージェント定義のモデル上書きが無視される
英語原文を表示
Added CLAUDE_CODE_SUBAGENT_MODEL_FORCE to apply CLAUDE_CODE_SUBAGENT_MODEL (or the main model) to every subagent, ignoring per-spawn and agent-definition model overrides

変更後

サブエージェント、エージェントチームのチームメイト、ワークフローエージェントのモデルを、定義ファイルやスポーン時の指定に優先されても確実に一つに統一できるようになり、コスト管理やモデル構成の一貫性を強制したい管理者・利用者のニーズに応える。

関連ドキュメント