LEARN · PHASE 12 · LESSON 84

The Decision Framework — Which Mechanism, When

The mechanisms are not ranked. They answer different questions, and the first

Type
Learn
Prerequisites
Phase 11 (Lessons 71–76), Lessons 77–83
Time
~40 minutes

Learning Objectives

  • Eliminate mechanisms with one question instead of comparing feature lists
  • Say which mechanisms cannot isolate workers in worktrees, and what to do instead
  • Separate "run agents" from "schedule" and "react", and stop reaching for the wrong family
  • Defend a choice by naming what would have to change for a different one to be right

The Problem

This course's own mission statement opens with how the learner got here: they knew Claude Code had several ways to run agents at once, could not say which one applied to the task in front of them, and guessed. Guessing cost a restart and a manual workaround.

Two guesses in particular are worth naming, because they are the two the names invite.

The first is reaching for agent teams because the task sounds like teamwork — several independent changes, and a word in the feature that matches a word in the problem. Agent teams are experimental and disabled by default, and they do not isolate teammates in worktrees, so five teammates editing one repository collide exactly the way five people would. That is the manual workaround.

The second is reaching for subagents because they are the mechanism you already know, on a task with 400 items. Delegation works; the hundredth summary does not. The window fills mid-run, compaction arrives, and the plan is now a summary of the plan.

Neither was a competence failure. Both were a question failure. Something like "who holds the plan here?" would have ruled out one candidate each.

This repo has the same scar at scale: two different renderers were wired into the same build step, each writing its own half-site into one directory. Two mechanisms doing one job, and the output looked plausible enough that it took a second look to notice.


The Concept

There are five ways to run agents, three support tools that are not mechanisms, and three adjacent families that solve different problems entirely. Almost every bad choice is a confusion between those three groups.

flowchart TD
    Q1{"Who holds the plan?"}
    Q1 -->|"Claude, turn by turn, one conversation"| A["Subagents"]
    Q1 -->|"You, hand off and check back"| B["Agent view"]
    Q1 -->|"A lead agent supervising peers"| C["Agent teams"]
    Q1 -->|"A script"| D["Dynamic workflows"]
    Q1 -->|"Claude, over days, machine off"| E["Projects"]
    A --> Q2{"Must the workers talk?"}
    B --> Q2
    C --> Q2
    D --> Q2
    Q2 -->|"peer to peer, plus a shared task list"| C
    Q2 -->|"findings, between sessions you run"| M["Cross-session messaging"]
    Q2 -->|"no, results go up"| OK["No extra tool"]
    OK --> Q3{"Same files?"}
    M --> Q3
    C --> Q3
    Q3 -->|Yes| W["Worktrees"]
    Q3 -->|No| N["Nothing more needed"]
Mermaid source — renders as a diagram where mermaid.js is available

Question 1: who holds the plan?

Ask this first, because the answer is one word and it eliminates four options.

The plan lives in…MechanismWhat it gives you
Claude's turn-by-turn judgement, inside one conversationSubagentsA worker that returns a summary. Results land in your window
Your judgement, dispatching and checking backAgent viewOne screen of background sessions, each with its own state
A lead agent's judgement, supervising peersAgent teamsShared task list and inter-agent messaging, led by one of the agents
A scriptDynamic workflowsDozens to hundreds of agents, intermediates in script variables
Claude's judgement, across daysProjectsParallel cloud threads that share the project's instructions

Read the first row against the last two. Subagents and workflows can run the same job; the difference is who decides what runs next. Turn-by-turn judgement is flexible and does not scale; a script scales and cannot improvise. Nothing here is better.

Question 2: must the workers talk?

AnswerWhat it means
Peer to peer, with a shared task listAgent teams. Teammates message each other directly
Findings only, between sessions you run yourselfCross-session messaging (Lesson 77)
No — each worker reports upNothing extra. Subagents already do the only communication you need
Only a summary at the endNothing extra. A workflow returns one result

The trap here is wanting "communication" when what you want is a result. A report going up to the conversation that spawned it is not collaboration, and it does not need a mechanism.

Question 3: do they touch the same files?

Worktrees are the answer, with one exception that matters.

  • A session you run yourself can use a worktree
  • A subagent can be given one
  • A session you dispatch from agent view moves into a worktree of its own before it edits files
  • Agent teams do not isolate teammates in worktrees

That last line is the one to memorise. For a team, isolation is your job: partition the work so each teammate owns a different set of files. Which is to say — if the task cannot be partitioned that way, the task is not a good fit for a team.

Three support tools, not mechanisms

ToolWhat it isWhat it is not
WorktreesA separate checkout per session or workerA coordination style. It answers where files land
Cross-session messagingText between sessions you runA task assignment system. It carries findings
/batchA skill that splits one large change into 5–30 worktree-isolated subagentsA mechanism of its own. It is subagents plus worktrees, packaged

Three adjacent families that are not parallelism at all

FamilyThe problem it solvesLesson
LoopsRun a prompt again later, on an interval82
HooksReact to an event, and decide what happens next83
Channels and routinesPush something in from outside; run without your machinePhase 17

If your question is "when does this run", you are in the loop family. If it is "what should happen when X does", you are in the hook family. Neither is a way to split work across workers, and reaching for one to do the other's job is how a loop becomes a bad scheduler and a hook becomes a bad queue.

Availability is part of the decision

Two of the five carry a maturity label, and pretending otherwise wastes an afternoon:

MechanismStatusConsequence
SubagentsStableNothing to think about
WorktreesStableNothing to think about
Dynamic workflowsPaid plans, plus API and the major cloud providersCheck before you plan a session around it
Agent viewResearch previewFine locally; do not build a team process on it yet
Agent teamsExperimental, disabled by defaultStraightforward to enable, but assume it changes

The reframe: ask who holds the plan first, because that one answer rules out

most of the list — and then ask about sharing, because "the workers need to

talk" and "the workers touch the same files" are different questions with

different answers.


Build It

1. Collect six real tasks

Not hypotheticals. Six things you actually did in the last two weeks that took more than an hour, or that you abandoned.

✅ You pass when every task has a one-line description of what the output was, not what you did.

2. Answer question 1 for each, in one word

Write the holder of the plan next to each task: Claude, me, lead, script, or nobody. nobody is a real answer, and it often means the task is not ready to parallelise at all.

✅ You pass when two or more tasks have different answers, and you can say what in the task decided it.

3. Apply questions 2 and 3 only where they apply

If question 1 gave you subagents or a workflow, question 2 is usually "no". Do not answer it anyway. If it gave you a team, question 3 decides whether the task is feasible — because a team will not isolate for you.

✅ You pass when at least one task is rejected by question 3, and you can say what you would change about the task to make it pass.

4. Name the runner-up

For each of your six choices, write the mechanism you did not pick and one sentence on what would have to change for it to be correct.

✅ You pass when your runner-up is a different answer to question 1, rather than a different opinion about the same answer.

5. Reproduce one wrong guess on purpose

Take a task where you were once wrong. Do it the wrong way, on something small enough to throw away.

✅ You pass when the failure is observable — colliding edits, a filled window, a summary where a plan used to be — and you can name the question you did not ask.

6. Read the failure out of the artifact

This build step has a real artifact behind it, and it is in this repo. Two renderers were wired into one build step and each wrote a half-site into the same directory. Read scripts/dynamic-workflow.mjs and find the comment block that explains the removal.

✅ You pass when you can say which two mechanisms were doing one job, and which question would have caught it.

The comparison this lesson uses is the docs' own, checked on 2026-10-15 against

Run agents in parallel and

the workflows page. Maturity labels

change faster than anything else in this course. Check

https://code.claude.com/docs/llms.txt before you rely on a status.


Use It

Your situationReach forBecause
A side task would flood your windowSubagentsResults summarise back; the mess stays out
Five independent tasks, you want to step awayAgent viewIt is built for handing off and checking state
A project to split, assign, and keep in syncAgent teamsShared task list and peer messaging
The same step across hundreds of itemsDynamic workflowsA script holds the plan and the results
Work spanning days, machine offProjectsCloud threads that share instructions
Workers on the same repo, independentlyWorktreesWhere the files land
One large mechanical change, split wide/batchPackaged subagents + worktrees
One session needs a finding from anotherCross-session messagingText between sessions you run
Nothing should run until tomorrowA loop or a routineDifferent family — timing, not splitting
Something must be impossibleA hookDifferent family — enforcement, not splitting

Exercises

  1. Write the three questions on a card and use them on your next three tasks before you open a terminal. ✅ You pass when at least one decision is different from what you would have guessed, and you can say which question changed it.
  1. A colleague proposes agent teams for five fixes spread across one repository. Write the two-sentence reply. ✅ You pass when the reply names the missing isolation and proposes either partitioning or a different mechanism — not both vaguely.
  1. Take the task from your list with the most items. Answer question 1 twice: once as Claude and once as script. Write what each version would look like. ✅ You pass when each version has a concrete failure mode the other does not.
  1. Name one task where the correct answer is none of the five. ✅ You pass when you can say why parallelism loses — and the reason is not "it felt like a lot of setup".

Key Terms

TermWhat people sayWhat it actually means
the plan"the approach"The decision about what runs next. Question 1 asks where it lives
subagents"parallel agents"Workers in one session, reporting summaries into Claude's window
agent view"the dashboard"Dispatching and monitoring background sessions you run. Research preview
agent teams"agents that talk"A lead plus peers with a shared task list and peer messaging. Experimental, off by default
dynamic workflow"the scripting one"A script the runtime executes. The plan is code, not judgement
projects"the cloud thing"Parallel cloud threads sharing a project's instructions across days
support tool"also a way to parallelise"Worktrees, messaging, /batch. They answer where and how findings travel
partition"split the work"Assign each worker a different set of files, because a team will not isolate for you
maturity label"fine print"Research preview and experimental are scheduling information, not marketing

What this lesson skipped

Whether you should parallelise at all. This lesson assumes the task divides and asks how. Lesson 85 asks whether it divides, and it is the more valuable question of the two.

Cost. Every one of these multiplies token use. Phase 14 is where you measure what a run actually spends; the size guideline in Lesson 78 is a crude brake.

Configuration. Enabling teams, dispatching from agent view, and the exact worktree flags are Phase 11 and Phase 16. This lesson is the choice, not the setup.

Channels, routines, and the rest of the automation surface. Named above so you stop confusing the families. Phase 17 is where they are configured.

Check yourself

6 questions. Answer before you reveal — recognising the right option is not the same as being able to produce it.

  1. Five independent fixes, all in one repository, and no plan to split the files between them. A colleague proposes agent teams. What is the blocking problem?

    1. Agent teams do not isolate teammates in worktrees, so the five writers collide unless you partition the work by file ownership
    2. Agent teams cannot share a task list, so nobody knows which fix is in progress
    3. Agent teams run in the cloud, so they cannot reach files on this machine
    4. Agent teams are limited to three peers, so five fixes do not fit
    Show answer

    A. Agent teams do not isolate teammates in worktrees, so the five writers collide unless you partition the work by file ownership

    The docs are explicit that agent teams do not isolate teammates in worktrees, which makes partitioning your responsibility — and the schema-less version of this task fails on exactly that. The shared-task-list answer inverts a real feature: a team's task list is one of the two things that makes it a team. Teams run where you enable them rather than in the cloud, and there is no three-peer limit in the material this lesson covers.

  2. You need the same transformation applied across 400 files, with the results collected and one summary at the end. Who should hold the plan?

    1. A script — a dynamic workflow, with intermediates in script variables
    2. Claude, turn by turn, delegating to subagents
    3. A lead agent supervising peers
    4. You, via agent view
    Show answer

    A. A script — a dynamic workflow, with intermediates in script variables

    One repeated step across a large list is the case where the plan should be code: the script holds the list and the results, and your conversation holds the final answer. The subagents answer is the one most people reach for because it works — up to the point where the hundredth summary lands in the window and compaction turns the plan into a summary of a plan. A lead agent adds coordination you do not need for one uniform step, and handing 400 items yourself is not a plan.

  3. You have five unrelated tasks and want to hand them off, then check on them from one place without any of them living in your current conversation. Which mechanism?

    1. Agent view — dispatch background sessions and watch their state
    2. Subagents — delegate from the current conversation
    3. Agent teams — a lead assigns the five tasks to peers
    4. Dynamic workflows — one script spawns five agents
    Show answer

    A. Agent view — dispatch background sessions and watch their state

    The 'not in your conversation' clause is the discriminator: agent view exists precisely to dispatch sessions you run and check back on. Subagents are the reflex answer and they fail the clause — their results come back into your window. A team adds a lead and peer messaging you did not ask for, and a workflow's five agents return one result to a script rather than five states you can inspect and steer.

  4. Which situation actually justifies agent teams rather than a simpler mechanism?

    1. Workers need to message each other directly and share a task list of who is doing what
    2. Workers need to report results back to the conversation that spawned them
    3. Workers need to be prevented from editing the same file
    4. Workers need to run on a schedule
    Show answer

    A. Workers need to message each other directly and share a task list of who is doing what

    Peer-to-peer messaging plus a shared task list is what a team is for, and it is the one thing none of the cheaper mechanisms provide. Reporting results upward is the definition of a subagent, so that option argues against a team. Preventing collisions is what worktrees do — and a team will not do it for you, which makes that option doubly wrong. Scheduling is a different family entirely.

  5. Where do loops and hooks belong in a decision about running multiple agents?

    1. Outside it — they answer when something runs and what happens on an event, not how work is split
    2. They are two more ways to run agents in parallel, alongside subagents and workflows
    3. They are support tools, like worktrees and /batch
    4. They replace the need to choose a mechanism, since a loop can dispatch agents
    Show answer

    A. Outside it — they answer when something runs and what happens on an event, not how work is split

    Loops and hooks are different families: timing and event reaction. Treating them as parallelism mechanisms is how a loop gets used as a scheduler and a hook gets used as a queue. They are not support tools either — worktrees, messaging, and /batch exist to serve parallelism, while a loop or a hook is useful with no parallelism anywhere in sight. And a loop that dispatches agents still leaves the 'who holds the plan' question unanswered.

  6. You are choosing between a dynamic workflow and agent teams for a job that both could do. Which fact should change your plan today, before any measurement?

    1. Agent teams are experimental and disabled by default, and workflows need a paid plan — so availability and stability, not capability, may decide it
    2. Agent teams are faster because peer messaging avoids the model's context window
    3. Workflows are limited to ten agents, so a large job rules them out
    4. Agent teams cannot use worktrees, so a workflow is always the safer choice
    Show answer

    A. Agent teams are experimental and disabled by default, and workflows need a paid plan — so availability and stability, not capability, may decide it

    Maturity and availability are part of the decision: an experimental feature that is off by default is not a foundation for a team process yet, and workflows require a paid plan with API access. The speed claim invents a performance characteristic the docs do not describe. Workflows scale to hundreds of agents rather than ten, so the third option gets the direction wrong — and the last option over-generalises a true fact (teams do not isolate) into a rule that ignores every other trade-off.