Skip to content
zero2vibecodelearn vibe coding
Level 4 · Parallel work 8 min Reviewed by the author · Oct 15, 2026 Verified against Claude Code v2.1.292 · Oct 15, 2026Official docs: SubagentsSomething out of date? Tell us

Choosing an orchestration pattern

Subagents, workflows and agent teams split work between workers. The difference is who holds the plan. Every pattern more complex than one conversation adds cost, so pick the cheapest one the task actually needs.

Level 4 · 0 / 4 lessons0%
In this lesson

You already know how to delegate to . But Claude Code has two more ways to split work between workers — workflows and agent teams. How do you choose?

Who holds the plan

All three patterns hand parts of the work to workers. The difference is who holds the plan:

PatternWho holds the planHow results come back
Main conversationyou and Claude, in one contextright in the conversation
SubagentsClaude, deciding turn by turneach result returns to your conversation
Workflowa script Claude wrotethe script keeps intermediate results; only the final one reaches the conversation
Agent teama lead; teammates message each other directlythrough the lead and the messages between teammates

Agent teams are an experimental feature, off by default. They get the last lesson of this level.

Three questions, in order

Every pattern more complex than one conversation adds cost: each subagent and each workflow agent sends its own requests, and a team uses noticeably more tokens than a single session. So ask the questions in order and stop at the first answer:

  1. Can one conversation handle it without filling the context? Yes — the main conversation.
  2. Do the workers need to talk to each other? Yes — an agent team.
  3. Do you need many agents, cross-checking of findings, or reruns? Yes — a workflow. No — subagents.

Example: subagents

The task: give a newcomer a short description of the src, test and docs folders. One conversation would clog up with files it will never need again. The descriptions do not need to talk to each other. Three tasks, once. So, subagents:

Explore the src, test and docs folders in parallel, with separate subagents, and give me two sentences about each.

In an interactive session, subagents run in the background by default, and the input stays free. While they work:

  • /tasks — the list of subagents with their state and model; Enter on a row opens that subagent’s transcript;
  • /usage — afterwards: on Pro, Max, Team and Enterprise plans, the breakdown shows how much went to skills, subagents, plugins and MCP servers. It is an estimate, not a bill.

A delegation log

To see who Claude actually started, attach a SubagentStart . It fires when each subagent starts and receives JSON with the fields agent_id and agent_type:

{
  "hooks": {
    "SubagentStart": [
      { "hooks": [ { "type": "command", "command": "jq -r '[.agent_id, .agent_type] | @tsv' >> \"$CLAUDE_PROJECT_DIR/.claude/agents.log\"" } ] }
    ]
  }
}

Save it in a separate file and start a session with it: claude --settings .claude/agent-log.json. The file’s keys are layered over your settings for that session only.

Quick check

The same check has to run across every file, each finding must be double-checked, and it repeats before every release. Which pattern?

Careful

Practice in the terminal

Check your understanding

Answered 0/3
Mode:

What really distinguishes subagents, workflows and agent teams?

You need a one-time short description of three project folders. Which pattern fits?

A background subagent asks for permission. You answer "yes, for the rest of the session". What does that affect?

Finish the task in the terminal and answer the questions to complete the lesson.

📝 My notes

Saved automatically in this browser · shows up on the Notes page.

Task

Build a delegation log: a settings file with a SubagentStart hook that appends the id and type of every subagent started to .claude/agents.log. Then start a session with it.

Tab complete · ↑ history · Ctrl+L clear · help commands

  • Not done: The hook fires when a subagent starts
  • Not done: The subagent's type goes into the log
  • Not done: A session started with the log file

Lesson Q&A

What really distinguishes subagents, workflows and agent teams?

Who holds the plan — Claude as the conversation goes, a script, or a lead whose teammates message each other — With subagents, Claude decides turn by turn, and the results come back into the conversation. In a workflow, a script holds the plan and the intermediate results. In a team, a lead directs teammates who talk to each other directly.

You need a one-time short description of three project folders. Which pattern fits?

Subagents — there are few tasks, they are independent and run once — One conversation would clog up with files it will never need again. The workers do not need to talk, and there is no verification or rerun — so, subagents.

A background subagent asks for permission. You answer "yes, for the rest of the session". What does that affect?

The whole session, including your main conversation — A permission that lasts longer than one call applies to the whole session. Approve such requests for one call only, and ask reviewers to only read.

The same check has to run across every file, each finding must be double-checked, and it repeats before every release. Which pattern?

The workers do not need to talk, but you need scale, verification and repetition. That is a job for a script that holds the plan — a workflow.

Commands in this lesson

Terms in this lesson

Move between lessons with ← → · search with ⌘K

Written and reviewed by Mikhail Kuzmitskii