0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

複数 subagent の出力予算を明示的に制御する(2026-07-12 時点の公式仕様)

0
Posted at

親エージェントが複数の subagent を並列に走らせる構成では、コストと遅延の支配項が「1 回の応答の長さ」ではなく「呼び出し回数 × 各呼び出しの出力長」に移る。本稿は、公式リリースノートで確認できる範囲に限定して、出力トークン予算を宣言的に上限づけるためのパラメータとベータヘッダーを整理する。検証日は 2026-07-12(JST)。

1 呼び出しあたりの出力上限: advisor の tools[].max_tokens

advisor ツールには、アドバイザーモデルの 1 回あたりの出力を上限づけるパラメータが追加された(2026-06-02)。

The advisor tool now supports a max_tokens parameter to cap the advisor model's output per call

設定箇所はツール定義側である。

Set tools[].max_tokens on the advisor tool definition

リリースノートは、この上限が「遅延と出力トークンコストの削減」に効く対象として、フルレングスのアドバイザー応答を必要としないワークロードを挙げている。並列 fan-out の各枝が短い判定だけを返せばよい場合が、これに該当する。

ループ全体の予算: task budgets(ベータ)

個々の呼び出しではなく、エージェンティックループ全体に対して予算を与える機能がベータ提供されている(2026-04-16)。

Give Claude an advisory token budget for a full agentic loop (thinking, tool calls, tool results, and output)

予算の対象は thinking・tool calls・tool results・output の全体であり、モデルは残量のカウントダウンを参照して作業の優先順位を決め、予算消費に合わせて作業を終える。利用にはベータヘッダーが必要である。

Include the task-budgets-2026-03-13 beta header in your requests.

対応モデルは拡張されており、Claude Opus 4.8 でも利用できる(2026-05-28)。

Task budgets now support Claude Opus 4.8.

thinking の深さ: effort

thinking の深さを制御するパラメータは effort に一本化され、GA 済みでベータヘッダーを要さない(2026-02-05)。

The effort parameter is now generally available (no beta header required)

Effort replaces budget_tokens for controlling thinking depth on new models.

新モデルでは budget_tokens の代替として effort を使う。出力上限(max_tokens)と thinking の深さ(effort)は別軸であり、両方を明示しない限り予算は締まらない。

単一呼び出しの上限を引き上げる: Message Batches API の 300k

上限は下げるだけでなく上げる方向にも動かせる。Message Batches API では、Claude Opus 4.6 と Sonnet 4.6 について max_tokens の上限が 300,000 トークンへ引き上げられた(2026-03-30)。

We've raised the max_tokens cap to 300k on the Message Batches API for Claude Opus 4.6 and Sonnet 4.6

Include the output-300k-2026-03-24 beta header to generate longer single-turn outputs

長文コンテンツ・構造化データ・大規模なコード生成といった単一ターンの長い出力が対象として挙げられている。

セッション単位の構成差し替え: agent_with_overrides

Claude Managed Agents では、セッション作成時に構成を上書きできる(2026-06-30)。

to replace the model, system prompt, tools, MCP servers, or skills for a single session

エージェント本体は変更されないため、同一エージェント定義のまま、セッションごとにモデルやツール構成を差し替えられる。

ツール出力の暴発: 100K spill

入力側の予算も自動で保護される。agent_toolset および MCP ツールの出力が 100,000 トークンを超えると、サンドボックス内のファイルへ自動的に退避される(2026-05-19)。

large outputs from agent_toolset and MCP tools exceeding 100K tokens are now automatically spilled to a file in the sandbox

The model receives a truncated preview with the file path

モデルはトランケートされたプレビューとファイルパスを受け取り、必要ならそこから全文を読む。

対応モデル

advisor ツールは Claude Opus 4.8 をサポートする(2026-05-28)。

The advisor tool now supports Claude Opus 4.8.

References

[1] https://platform.claude.com/docs/en/release-notes/overview

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?