ダブルクリックで英日反転
Applied Sciences · Engineering
Claude Code Subagents: When Parallel Actually Means Parallel
Calling multiple Agent tools in one assistant message runs them concurrently. Calling them one per turn is serial. That single distinction changes everything about how you design multi-agent workflows.
What a subagent is
- Independent conversation instance with its own context window, system prompt, tools, and model.
- Launched via the Agent tool (formerly Task, renamed in v2.1.63).
- Defined as Markdown + YAML front matter in .claude/agents/ or ~/.claude/agents/.
- A subagent cannot spawn further subagents — nesting is explicitly forbidden.
Parallelism conditions
- Multiple Agent calls in one assistant reply → harness runs them simultaneously.
- One Agent call per turn → serial execution, not parallel.
- The only channel parent→subagent is the prompt string; no shared context.
- No explicit numeric cap documented; rate limits and context windows are the practical bounds.
When parallel pays off
- Mutually independent tasks (test runner + linter + security scanner at once).
- Results are summaries only — keeps parent context from swelling.
- File ownership is cleanly divided between agents.
- Anthropic case study: parallelisation cut investigation time by up to 90%.
When parallel hurts
- Same file edited by multiple agents → race condition, last writer wins.
- Dependent tasks (B needs A's output) → launch sequentially instead.
- Redundant exploration → 3 similar greps = 3× tokens for the same data.
- Total tokens scale as N× even if wall-clock stays roughly flat.
→ Parallel subagents save wall-clock time, not compute — only worth it when sub-tasks are genuinely independent.
Applied Sciences · Engineering
Claude Code サブエージェント:「並列」が本当に並列になる条件
1つのアシスタントメッセージ内で複数のAgentツールを呼び出すと同時実行になる。ターンをまたいで1件ずつ呼ぶと直列になる。この違いを把握するだけでマルチエージェント設計が大きく変わる。
サブエージェントとは
- 親会話とは独立したコンテキストウィンドウ・システムプロンプト・ツール・モデルを持つ別会話インスタンス。
- Agentツール(旧名Task、v2.1.63でリネーム)で起動する。
- .claude/agents/ または ~/.claude/agents/ にMarkdown+YAMLで定義。
- サブエージェントがさらにサブエージェントを生成するネスト(入れ子)は明示的に禁止。
並列実行の条件
- 1つのアシスタント返信に複数のAgent呼び出しを並べる → ハーネス(実行基盤)が同時実行。
- ターンごとに1件ずつ呼ぶ → 直列実行。
- 親からサブへ渡せる情報はプロンプト文字列のみ。コンテキストは共有されない。
- 同時実行の上限値は公式文書に明記なし。実際はレート制限とコンテキスト長が上限。
並列が有効なケース
- 相互に独立した作業(テスト・リンター・セキュリティスキャンを同時実行など)。
- 結果をサマリーのみで返し、親コンテキストの肥大化を防ぎたい場合。
- エージェント間でファイルの所有権が明確に分離されている場合。
- Anthropic事例:並列化で調査時間を最大90%短縮と報告。
並列が逆効果になるケース
- 複数エージェントが同一ファイルを書き換える → 競合(レースコンディション)で最後の書き込みだけ残る。
- BがAの出力を前提とする依存関係がある場合 → 直列実行に切り替える。
- 同じ探索を重複実行 → 3つの類似grepは同じ情報をトークン3倍で読む。
- 壁時計時間(実経過時間)は横ばいでもトークン総量はN倍。
→ 並列サブエージェントが節約するのは壁時計時間であって計算量ではない。サブタスクが本当に独立している場合にのみ有効。
Applied Sciences · Engineering
Claude Code Subagents: When Parallel Actually Means Parallel
Calling multiple Agent tools in one assistant message runs them concurrently. Calling them one per turn is serial. That single distinction changes everything about how you design multi-agent workflows.
What a subagent is
- Independent conversation instance with its own context window, system prompt, tools, and model.
- Launched via the Agent tool (formerly Task, renamed in v2.1.63).
- Defined as Markdown + YAML front matter in .claude/agents/ or ~/.claude/agents/.
- A subagent cannot spawn further subagents — nesting is explicitly forbidden.
Parallelism conditions
- Multiple Agent calls in one assistant reply → harness runs them simultaneously.
- One Agent call per turn → serial execution, not parallel.
- The only channel parent→subagent is the prompt string; no shared context.
- No explicit numeric cap documented; rate limits and context windows are the practical bounds.
When parallel pays off
- Mutually independent tasks (test runner + linter + security scanner at once).
- Results are summaries only — keeps parent context from swelling.
- File ownership is cleanly divided between agents.
- Anthropic case study: parallelisation cut investigation time by up to 90%.
When parallel hurts
- Same file edited by multiple agents → race condition, last writer wins.
- Dependent tasks (B needs A's output) → launch sequentially instead.
- Redundant exploration → 3 similar greps = 3× tokens for the same data.
- Total tokens scale as N× even if wall-clock stays roughly flat.
→ Parallel subagents save wall-clock time, not compute — only worth it when sub-tasks are genuinely independent.
Applied Sciences · Engineering
Claude Code サブエージェント:「並列」が本当に並列になる条件
1つのアシスタントメッセージ内で複数のAgentツールを呼び出すと同時実行になる。ターンをまたいで1件ずつ呼ぶと直列になる。この違いを把握するだけでマルチエージェント設計が大きく変わる。
サブエージェントとは
- 親会話とは独立したコンテキストウィンドウ・システムプロンプト・ツール・モデルを持つ別会話インスタンス。
- Agentツール(旧名Task、v2.1.63でリネーム)で起動する。
- .claude/agents/ または ~/.claude/agents/ にMarkdown+YAMLで定義。
- サブエージェントがさらにサブエージェントを生成するネスト(入れ子)は明示的に禁止。
並列実行の条件
- 1つのアシスタント返信に複数のAgent呼び出しを並べる → ハーネス(実行基盤)が同時実行。
- ターンごとに1件ずつ呼ぶ → 直列実行。
- 親からサブへ渡せる情報はプロンプト文字列のみ。コンテキストは共有されない。
- 同時実行の上限値は公式文書に明記なし。実際はレート制限とコンテキスト長が上限。
並列が有効なケース
- 相互に独立した作業(テスト・リンター・セキュリティスキャンを同時実行など)。
- 結果をサマリーのみで返し、親コンテキストの肥大化を防ぎたい場合。
- エージェント間でファイルの所有権が明確に分離されている場合。
- Anthropic事例:並列化で調査時間を最大90%短縮と報告。
並列が逆効果になるケース
- 複数エージェントが同一ファイルを書き換える → 競合(レースコンディション)で最後の書き込みだけ残る。
- BがAの出力を前提とする依存関係がある場合 → 直列実行に切り替える。
- 同じ探索を重複実行 → 3つの類似grepは同じ情報をトークン3倍で読む。
- 壁時計時間(実経過時間)は横ばいでもトークン総量はN倍。
→ 並列サブエージェントが節約するのは壁時計時間であって計算量ではない。サブタスクが本当に独立している場合にのみ有効。
Related notes
- Agentic Commerce — ACP and Visibility into Being 'Bought by AI'
- AI Search Evaluation: The 12 Metrics — Gateway
- AI Search Evaluation ①Citation Rate — How Many URLs Are Pulled In Per Answer
- AI Search Evaluation ②Source Diversity — How Unskewed the Cited Sources Are
- AI Search Evaluation ③Accuracy Score — How Often It Answers Factual Questions Correctly
- AI Search Evaluation ④Answer Length — How Many Characters It Returns to the User on Average