Lv.1 0 XP

The Task Tool — How Coordinators Spawn Subagents

Core 7 min +30 XP
💡
THE ANALOGY

A manager filling out a work order. The work order specifies what needs to be done, what resources the worker has access to, and what a successful outcome looks like. The Task tool is that work order — it defines the subagent's entire working context.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Thinking the Task tool is built into Claude. It isn't — your orchestration layer implements what happens when Claude calls a tool named 'Task'. You define the tool schema and the orchestration logic.

KEY POINTS
1 The Task tool is a pattern, not a built-in Claude feature — you define it in your tools array and your code executes it when Claude calls it.
2 allowedTools in the coordinator's tool definition controls what tools the coordinator can use — the subagent's tools are passed separately in the Task input.
3 A subagent spawned by the Task tool runs its own complete agentic loop — it can use tools, make decisions, and return a final result.
4 The coordinator receives the subagent's final response as the tool_result — it sees only the final output, not the subagent's internal reasoning.
5 Subagent tool access should be scoped to minimum necessary — a search subagent doesn't need file write access.