Claude Architect WorkshopPDFEPUBlearnwithparam.comkaas.team

Foundations, lesson 10

Coordinator and subagents

One coordinator spawns focused researchers together

A team asks Claude for a recall report on a faulty power bank. The coordinator plans only the cause and the scope, so customers and the regulator are never researched. It also starts one researcher per turn, so the report is slow and incomplete. This is the agent at Lumen Supply, an online electronics shop. You will watch one coordinator miss angles and wait, then fix it with a plan and a brief.

I doWatch the failure and its fix.

A coordinator plans the angles and researchers cover them

The coordinator does not research. It splits the topic into angles that together cover the whole report, briefs one researcher for each, and merges what comes back. The plan lists the angles, the model spawns and merges, and the Agent SDK runs the subagents.

This design fails in three ways. The split is too narrow, the researchers run one per turn, and the subagents get steps instead of goals. You will see the first two fail, then fix them.

The coordinator runs the same agent loop as in An agent is a loop that ends on stop_reason. Claude picks the next tool, each result joins the history, and the loop continues on tool_use and stops on end_turn. A turn cap is only a safety net, never the stop rule.

One coordinator briefs a researcher for each angle at once.Coordinatorplans the anglesCauseresearcherScoperesearcherCustomersresearcherRegulatorresearcherReportone line per anglethe plan and the brief are written in coordinator.pyOne coordinator briefs a researcher for each angle at once.Coordinatorplans the anglesCauseresearcherScoperesearcherCustomersresearcherRegulatorresearcherReportone line per anglethe plan and the brief are written in coordinator.py

Every angle is covered and the researchers run together

The coordinator spawns a researcher for the cause, the scope, the customers and the regulator. All four Agent calls arrive in one response, so the researchers run at the same time.

Open the coordinator card to read the four angles. The report holds one finding for each. The tool that spawns a researcher is the Agent tool. Older releases and the exam guide call it Task.

  1. ColleagueWrite the recall report for the power bank.
  2. Researcher toolseach researcher may call 1 tool(s)
  3. Coordinatorresponse 1: 4 researcher(s)
    Show the result
    Power bank recall: cause of fault
    Power bank recall: affected units scope
    Power bank recall: customers with units
    Power bank recall: regulator to notify
  4. ClaudePower bank recall report - Cause of fault: Cells swell because one separator batch was faulty (one note, found…
    Show the result
    Power bank recall report
    
    - Cause of fault: Cells swell because one separator batch was faulty (one note, found in two searches; no further detail).
    - Scope of affected units: Units made in March, lots seven to nine. No models, serial ranges, exact batch dates, or total unit count in the notes.
    - Customers with a power bank: Customer instruction in the notes: "Stop using it and quote swap code PB7." No count of affected customers and no method for identifying them.
    - Regulator to tell: Notes say "Tell the consumer safety agency within ten days." The agency's name, jurisdiction, required form, and what starts the ten-day clock are not in the notes. The ten-day deadline can't be dated until the trigger is confirmed.
    
    Gaps to close before filing: the affected model and serial ranges, the number of units and customers, how customers are contacted, and the regulator's identity and filing requirements. I haven't sent any notice to a regulator.

4 of 4 angles covered, all spawned in one response.

The plan and the brief as written

plan chooses the angles and brief writes the coordinator's instructions. The starting plan lists two angles and the starting brief says to research one at a time.

The wait adds up. If each researcher takes 6 seconds, four in a row take 24 seconds. Four at once take 6.

starter/coordinator.py
1"""The recall coordinator: which angles to research, and how to brief."""234def plan(topic: str) -> list[str]:5 """The angles a recall report needs.6 TODO(workshop): a full report needs four angles: the cause, the scope,7 what customers must do and which regulator must be told.8 """9 return [10 f"cause of the {topic} fault",11 f"scope of the affected {topic} units",12 ]131415def brief(angles: list[str]) -> str:16 """The coordinator's instructions."""17 lines = "\n".join(f"- {a}" for a in angles)1819 return (20 "You lead a recall report. Research each angle below one at a "21 "time: spawn a researcher, wait for its findings, then spawn the "22 "next.\n"23 f"{lines}\n"24 "Then write the report."25 )

What does the report hold when the plan has two angles?

Take the recall request. The plan lists the cause and the scope. The brief says to spawn a researcher, wait for its findings, then spawn the next.

Predict: What does the report say about customers and the regulator?

  1. ANothing researched, because no researcher was asked.
  2. BA finding for each, because researchers are thorough.
Show the answer

A. The coordinator follows its plan. An angle nobody owns is never researched, so the report has gaps or fills them with guesses.

The report has gaps and takes two turns

This is the same request with the starting plan and brief. Two researchers appear, one per response, and the report has no finding on the regulator. The outcome line is red.

This is a real Claude Haiku 5.5 run through the Agent SDK, recorded once and replayed here.

  1. ColleagueWrite the recall report for the power bank.
  2. Researcher toolseach researcher may call 1 tool(s)
  3. Coordinatorresponse 1: 1 researcher(s)
    Show the result
    Research power bank fault cause
  4. Coordinatorresponse 2: 1 researcher(s)
    Show the result
    Research power bank affected scope
  5. ClaudeRecall Report: Power Bank Status: Draft. The notes support a cause and a partial scope, but several required…
    Show the result
    Recall Report: Power Bank
    
    Status: Draft. The notes support a cause and a partial scope, but several required fields are missing.
    
    1. Defect and cause
    - Failure mode: Battery cells swell.
    - Root cause (as recorded in the notes): One separator batch was faulty.
    - Evidence: The notes contain one statement of the cause. It has no source ID, test data, or description of how the swelling was observed.
    - Open questions: The notes don't say whether the faulty separator batch is the only cause, whether swelling is linked to overheating, or how the defect was confirmed.
    
    2. Affected units (scope)
    - Confirmed from the notes: Units made in March, lots 7 through 9.
    - Not yet established: Model numbers, serial ranges, year of manufacture, total unit count, markets, and customers or distributors.
    - Caution: The March / lots 7–9 entry is the only scope note found. Follow-up searches found nothing else. It can't be treated as the complete scope until it's confirmed against manufacturing or lot records.
    
    3. Customer action
    - The notes give the interim instruction: "Stop using it and quote swap code PB7." It doesn't say which units this covers, so it should be confirmed against the scope above before it's published.
    
    4. Gaps before this can be finalized
    1. Confirm the separator-batch root cause with engineering or supplier records, and get the source reference.
    2. Obtain the affected model numbers, serial or lot ranges, and manufacturing dates from production records.
    3. Establish the unit count and the markets and channels where the units were sold.
    4. Confirm the PB7 swap code and customer instructions against the confirmed scope.
    5. Check whether a regulator notice is required. I did not send one, since the scope is not yet confirmed.

3 of 4 angles covered, spawned across 2 responses.

Cover the whole topic, then spawn together

The fix has two parts. plan lists an angle for each concern the report must answer. brief tells the coordinator to spawn every researcher in the same response. It also tells the coordinator to name any angle with no findings.

The brief also gives each researcher a goal, not a script of steps. A subagent starts fresh: it sees none of the coordinator's turns, so the goal and the fact it must return are all it learns about the task. Independent angles have no reason to wait.

Angles must not overlap. If two researchers repeat the same queries, divide the topic so each owns one question. Ask each subagent a specific question, and keep the coordination in the main agent. When the merged findings hold an empty section, have the coordinator send a new task for that angle.

What happens when a colleague asks for a recall report.ColleagueCoordinatorResearchersrecall requestone brief per anglefindingsreport
coordinator.pygreen lines are what the fix adds
1"""The recall coordinator: which angles to research, and how to brief."""234def plan(topic: str) -> list[str]:5 """The angles a full recall report needs."""6 return [7 f"cause of the {topic} fault",8 f"scope of the affected {topic} units",9 f"customers with a {topic}",10 f"regulator to tell about the {topic}",11 ]121314def brief(angles: list[str]) -> str:15 """The coordinator's instructions."""16 listed = "; ".join(angles)1718 return (19 "Spawn one researcher per angle, all in the same response, so they "20 "run together. Do not wait between spawns. Each researcher starts "21 "fresh and sees none of your turns, so give it its goal: the one "22 "fact the report needs from that angle. "23 f"Angles: {listed}. "24 "Then write a report with one line per angle, keeping each "25 "researcher's facts. Name any angle that has no findings."26 )
We doChange one setting at a time and predict.

The same request, two different ends

Use the switch to run the request with the starting coordinator, then the fixed one. The card marked "This is where the runs split" is the first difference between the two runs.

Try the smart plug too. The fix holds on a different recall.

The shape of the work picks the plan. A fixed chain runs the same steps in order, which suits a weekly report. An adaptive plan lets each finding pick the next step, which suits an unknown incident. A review that reads files one at a time misses links between them, so add a last pass on how they connect.

This part is interactive in the lab: run ./workshop watch coordinator-subagents.

Each role gets only its tools

Every researcher here needs one tool, the notes search. Switch to the run where it may also call the notice sender and the web search. The report is the same, but a researcher that could send a notice to a regulator could have done it.

An agent with 18 tools picks the wrong one more often than one with 4 or 5, so give each role its own tools. When one step must come first, set tool_choice, the setting that names the tool Claude must call, to it. The value any only forces some call.

This part is interactive in the lab: run ./workshop watch coordinator-subagents.

Try it: coordinator and recall

Change one setting at a time. Pick the power bank or the smart plug, the plan and the spawn. A broad plan alone still costs four responses, and spawning together alone still leaves two angles with no findings.

Every combination is a recorded run, so this works with no internet.

This part is interactive in the lab: run ./workshop watch coordinator-subagents.

Researchers in the Agent SDK

A researcher is a subagent defined by a description, a prompt and a tool list. The coordinator starts it with the Agent tool, so that tool must be allowed. The notice sender and the web search go in disallowed_tools, so not even the coordinator can call them.

The harness runs the request through the SDK's query() and counts the researchers spawned in each response. This is a real Claude Haiku 5.5 run.

In a long investigation the early findings scroll far back. A scratchpad is a plain file the agent writes findings to and rereads on resume. fork_session branches a resumed session to try another approach. Keep noisy discovery in a subagent, and after a crash resume from saved state.

app/agent.pyfile: 238 lines
···74 lines not shown75 async def web(args: Json) -> Json:76 return text("No results.")7778 return create_sdk_mcp_server(SERVER, tools=[search, notice, web])798081def researcher(wide: bool = False) -> dict[str, AgentDefinition]:82 """The one kind of subagent the coordinator can spawn.8384 Its tool list is the lesson: one tool, or every tool on the server.85 """86 return {87 "researcher": AgentDefinition(88 description="Researches one recall angle with the notes tool.",89 prompt="Search the notes for the angle you are given. "90 "Reply in one line, or say there are no notes.",91 tools=[SEARCH, *EXTRA] if wide else [SEARCH],92 model="haiku",93 )94 }959697def request_for(98 ticket: Ticket, coordinator: ModuleType, wide: bool = False99) -> Json:···139 lines not shown
  1. ColleagueWrite the recall report for the smart plug.
  2. Researcher toolseach researcher may call 1 tool(s)
  3. Coordinatorresponse 1: 4 researcher(s)
    Show the result
    Smart plug fault cause
    Smart plug affected scope
    Smart plug customers
    Smart plug regulator
  4. ClaudeSmart plug recall report - Cause: The relay sticks closed when it overheats. This is the only cause in the…
    Show the result
    Smart plug recall report
    
    - Cause: The relay sticks closed when it overheats. This is the only cause in the notes. Why it overheats, and whether a fix or recall exists, are not recorded.
    - Scope: Partial. The only note says "Units sold from June to August," with no year. No models, serial or lot ranges, quantities, or regions are recorded.
    - Customers: No findings for customers. The only related note is "Unplug it and quote credit code SP3." It names no customers, counts, contact details, or units.
    - Regulator: The electrical safety board must be told "within a week." The notes don't give its proper name, jurisdiction, reporting form, or the date the week starts.
    
    I did not send a notice to the regulator. The notes don't include the agency's name or reporting form, and the notice tool was not needed to write this report.

4 of 4 angles covered, all spawned in one response.

You doFix the starting code, then test yourself.

You do: fix the plan and the brief

Copy the starting code and open work/coordinator-subagents/coordinator.py. plan() returns two angles where a recall report needs four, and brief() spawns the researchers one at a time.

Terminal
./workshop start coordinator-subagents
./workshop check coordinator-subagents
./workshop watch coordinator-subagents

The checks want the cause, scope, customers and regulator in the plan, and every angle in the brief. They expect all researchers spawned in one response, and a named gap for an angle with no findings.

Check your understanding

Answer each question, then read why every option is right or wrong. The wrong options are the mistakes engineers make on the job.

1. A recall report for a power bank has sections on the cause and the scope but nothing on the regulator. The coordinator's plan listed two angles, and each got a researcher. What is the root fix?

  1. AAdd a line saying the regulator is out of scope, since both researchers finished.
  2. BChange the plan so its angles cover the whole topic, including customers and the regulator.
  3. CTell the writer to sound more confident in the regulator section.
  4. DGive each researcher 10 more search turns.
Show the answer

Answer: B

  • A Both researchers finishing shows only that the two angles were covered. The report still lacks what it must answer.
  • B Correct. An angle nobody owns is never researched, so the gap starts in the plan.
  • C Confident wording cannot add a finding that no researcher produced.
  • D More turns deepen the two angles. They do not create a third or a fourth.

2. Two researchers repeat the same search: 40 percent of their queries overlap. Their angles are both worded as 'the power bank' plus a verb. What fixes the overlap?

  1. ARun them one at a time so the second can skip what the first found.
  2. BRaise the search limit so both researchers can finish every query they start without being cut off.
  3. CUse one researcher for all four angles so nothing repeats.
  4. DDivide the topic into angles that do not overlap, each with its own question.
Show the answer

Answer: D

  • A A researcher starts fresh and never sees what the first one found, so it cannot skip anything. The wait only adds seconds.
  • B A higher limit lets both repeat more. The overlap is in the split.
  • C One researcher loses the parallel speed and still needs the angles defined.
  • D Correct. Distinct angles give each researcher different work, so the repeated queries disappear.

3. The coordinator reads the merged findings and sees that the customer section is empty. The plan listed only cause and scope. What should happen next?

  1. ASend a new task out for the missing angle, then merge again.
  2. BPublish the report and note that customers were out of scope.
  3. CAsk the scope researcher to guess what customers must do.
  4. DRestart the run with a longer brief for the cause researcher.
Show the answer

Answer: A

  • A Correct. A coordinator judges the synthesis and sends work back out when an angle has no findings.
  • B The plan was narrow by mistake. Calling it out of scope hides a gap the report must fill.
  • C A guess is not a finding, and that researcher has no notes on customers.
  • D A longer brief changes one angle. The missing angle still has no owner.

4. Select two duties the coordinator owns in a hub-and-spoke design.

  1. ARouting work to subagents and merging what they return.
  2. BRunning every search itself so the subagents stay idle.
  3. CPassing every message between subagents, so they never talk to each other directly.
  4. DLetting each subagent read the whole history so it can decide alone.
Show the answer

Answer: A, C

  • A Correct. Splitting, briefing and merging are the coordinator's job.
  • B Then there is nothing to coordinate and no parallel speed.
  • C Correct. All traffic goes through the hub, which is what keeps the run observable.
  • D A subagent has its own context, and deciding alone breaks the single point of control.

5. Four researchers are spawned one per turn. Each takes 6 seconds, so the report takes 24 seconds for work that could take 6. What change removes the wait?

  1. ARun them one at a time to be safe, and check each answer.
  2. BLower each researcher's turn limit to 1.
  3. CTell the coordinator to spawn all four in the same response.
  4. DGive one researcher all four angles in one long brief.
Show the answer

Answer: C

  • A Independent researchers do not affect each other, so serial runs buy no safety.
  • B A turn limit does not change when a researcher starts.
  • C Correct. Independent angles have no reason to wait, so the time becomes the slowest researcher.
  • D That one researcher still works through them in turn, so the 24 seconds stay.

6. A recall report needs the cause, the regulator and the customers, plus a supplier audit that depends on which part the cause researcher names. Which researchers should the coordinator spawn in its first response?

  1. AAll four in one response, since spawning together always beats waiting for any result.
  2. BThe cause, regulator and customer researchers now, and the audit once the cause returns.
  3. COne researcher per response, since a single dependency makes the whole plan run in series.
  4. DThe cause researcher alone, then the other three together once its finding is in.
Show the answer

Answer: B

  • A The audit needs the failed part, so spawning it now gives it nothing to audit.
  • B Correct. Independent angles go out together, and only the dependent one waits.
  • C Only the audit depends on another angle. The other three have no reason to wait.
  • D The regulator and customer angles do not need the cause, so holding them back adds a turn.

7. An AgentDefinition exists for a researcher, yet no subagent is spawned in 12 turns. The coordinator's tool list holds only the search tool. What is missing?

  1. AA higher turn limit, since 12 turns is too few to start a subagent.
  2. BA model setting on the definition so it runs on a larger model.
  3. CA second AgentDefinition so the coordinator has a choice.
  4. DThe Agent tool (Task in older releases) in the allowed tools.
Show the answer

Answer: D

  • A Starting one takes a single call. The tool is missing, not the turns.
  • B The model of a subagent matters after it starts.
  • C A second definition cannot be spawned either without the tool.
  • D Correct. Without it the coordinator has no way to start a subagent.

8. Select two facts about four researchers spawned by Agent calls in one coordinator response.

  1. AThey share one context, so each can read the findings of the others.
  2. BThey run at the same time instead of one after another.
  3. CThe wait becomes the slowest researcher, not the sum of all four.
  4. DThe coordinator must still read each result before the next can start.
Show the answer

Answer: B, C

  • A Each subagent starts fresh with its own context. Findings come back only to the coordinator.
  • B Correct. Several Agent calls in one response start together.
  • C Correct. Four 6-second researchers finish in about 6 seconds, not 24.
  • D That is the one-per-turn pattern this replaces. Calls in one response do not wait on each other.

9. An outage of unknown origin needs investigating, and nobody knows which service is involved. Which plan fits?

  1. AA fixed chain of ten steps written before the first query.
  2. BAn adaptive plan that maps the system, then picks each next step from what the last one found.
  3. COne long prompt that lists every likely cause and tells the researcher to check each one in order.
  4. DNo plan: let each researcher run until it feels done.
Show the answer

Answer: B

  • A A script cannot react to what the first query shows.
  • B Correct. When the steps are not known, each finding decides the next step.
  • C A checklist spends turns on causes the findings already rule out.
  • D With no plan, angles overlap and gaps stay.

10. A weekly report runs the same 5 steps every Monday and its format never changes. Which design fits?

  1. AAn adaptive plan that rediscovers the steps each week.
  2. BA coordinator that spawns 5 researchers with open goals.
  3. CA fixed chain, because the steps repeat.
  4. DOne prompt with no steps.
Show the answer

Answer: C

  • A Rediscovery costs tokens each week for a result that never changes.
  • B Open goals suit unknown work. Here the work is known.
  • C Correct. Known, repeated steps are cheapest and most predictable as a fixed pipeline.
  • D Without steps a repeated job drifts from week to week.

11. A code review reads 14 files one at a time and misses that a function in one file is called wrongly from another. What fixes the miss?

  1. AAdd an integration pass that reads across files after the per-file passes.
  2. BRead each file twice with a stricter prompt.
  3. CFit all 14 files into one pass with a larger window.
  4. DDrop the per-file passes and review only a summary.
Show the answer

Answer: A

  • A Correct. Links between files only show when files are read together.
  • B Each read is still one file, so the link stays invisible.
  • C A larger window does not fix how attention spreads across 14 files.
  • D A summary drops the detail where the bug lives.

12. Select two true facts about fixed pipelines and adaptive plans.

  1. AA fixed pipeline suits work that repeats with known steps.
  2. BAn adaptive plan is cheaper because it needs no planning calls.
  3. CA fixed pipeline handles a surprise by rewriting its own steps.
  4. DAn adaptive plan suits discovery, where each step depends on the last finding.
Show the answer

Answer: A, D

  • A Correct. Predictable work gets predictable cost.
  • B Adaptive plans spend calls on planning as they go.
  • C A fixed pipeline cannot change its steps.
  • D Correct. Unknown problems need the next step chosen from evidence.

13. One agent holds 18 tools and picks the wrong one in 3 of 10 calls. What should you change?

  1. AWrite a longer description for each of the 18 tools.
  2. BGive every agent every tool so the model can choose freely.
  3. CSet tool_choice to any so it must call something.
  4. DGive it the 4 to 5 tools that fit its role.
Show the answer

Answer: D

  • A Longer text adds more to compare across 18 choices.
  • B More choices make selection worse for every agent.
  • C That forces a call. It does not make the call the right one.
  • D Correct. Fewer tools raise selection accuracy, and other roles get their own tools.

14. A search researcher was given an email tool just in case. In 2 of 20 runs it emailed a draft to a customer. What is the fix?

  1. AKeep the email tool and add a prompt line that asks the researcher not to send email to customers.
  2. BRemove the email tool, because it sits outside the researcher's role.
  3. CGive the email tool to every other agent too, for consistency.
  4. DLower the temperature so it stops using tools it does not need.
Show the answer

Answer: B

  • A A prompt line is a request, and 2 in 20 shows requests slip.
  • B Correct. A tool outside the role invites misuse. Removing it removes the failure.
  • C That spreads the risk to every agent.
  • D Temperature changes variety, not which tools are offered.

15. The first step of a run must be a lookup, but 4 runs in 20 skip it and search first. How do you fix the order?

  1. ASet tool_choice to any so the model picks the best first tool.
  2. BPut the lookup last in the tool list so it is read last.
  3. CForce one named tool on the first turn with tool_choice.
  4. DAdd a bold line to the prompt asking for the lookup first.
Show the answer

Answer: C

  • A Any means a tool must be called, and the model still picks which.
  • B List order does not set call order.
  • C Correct. A named tool fixes which call comes first.
  • D Emphasis raises the odds and still leaves 1 run in 20 to chance.

16. Select two values that tool_choice accepts.

  1. Abest, where the model picks the most accurate tool.
  2. Bany, where the model must call some tool but picks which.
  3. CA single named tool, which forces that call.
  4. Dsequence, which runs the tools in the listed order.
Show the answer

Answer: B, C

  • A There is no best value. The model chooses among tools only under auto or any.
  • B Correct. It guarantees a call and leaves the choice to the model.
  • C Correct. It fixes the exact tool, and auto lets the model decide whether to call.
  • D tool_choice does not schedule tools.

17. A 3-hour investigation starts quoting generic patterns instead of its 12 early findings, which have scrolled far back in the context. What helps?

  1. AWrite findings to a scratchpad file and re-read it when the work resumes.
  2. BRepeat the original goal every 10 turns.
  3. CRaise the turn limit so the agent has more room.
  4. DAsk for a one-line summary of everything each turn.
Show the answer

Answer: A

  • A Correct. A file keeps exact findings outside the context that scrolls.
  • B The goal is not the findings that were lost.
  • C More turns add more context to scroll past.
  • D A summary drops the specifics and sources.

18. Noisy discovery adds 60,000 tokens of search output to the main context, and later answers get worse. What is the better design?

  1. AKeep the raw output and tell the model to ignore the noise.
  2. BHave a subagent do the search and return a short answer.
  3. CCut the search output to its first 500 tokens.
  4. DRun the searches on a larger model.
Show the answer

Answer: B

  • A Tokens in context still draw attention whether or not they are ignored.
  • B Correct. The noise stays in the subagent's context and only the answer comes back.
  • C The answer may sit after the cut.
  • D A larger model does not shrink the context.

19. A run crashed at phase 3 of 5 after 40 minutes. How should it resume?

  1. AStart again from phase 1 with the same prompt.
  2. BAsk the model to recall what phase 3 held and to redo only the parts it remembers.
  3. CResume from the last chat message alone.
  4. DLoad the saved structured state and continue from phase 3.
Show the answer

Answer: D

  • A That repeats 40 minutes of finished work.
  • B A new session has no memory of the old one.
  • C Chat text is not structured state.
  • D Correct. Saved state lets a run resume without repeating finished phases.

20. Select two coordination rules for a multi-step investigation.

  1. AAsk subagents specific questions rather than open topics.
  2. BLet each subagent decide the next phase and start it.
  3. CKeep the coordination in the main agent.
  4. DPass each subagent the full history so it can coordinate.
Show the answer

Answer: A, C

  • A Correct. A specific question returns a finding the coordinator can merge.
  • B Subagents deciding for themselves lose the single point of control.
  • C Correct. One place decides the next step, so the run stays understandable.
  • D A subagent does not see the history, and it should not need to.

21. A loop stops when the reply text contains the word done. In 6 of 30 runs the model writes done while a tool call is still pending. Which stop rule is right?

  1. AStop when the reply text names no tool.
  2. BStop once the reply is longer than 200 words.
  3. CStop on the end_turn stop reason and continue on tool_use.
  4. DStop after a fixed 3 turns.
Show the answer

Answer: C

  • A Text parsing misreads a reply that mentions a tool by name.
  • B Length says nothing about pending calls.
  • C Correct. The stop reason is the model's own signal that it has no more calls.
  • D A fixed count cuts off long jobs and pads short ones.

22. Tool results are not added to the history, and the model repeats the same call 5 times. What is missing?

  1. ARaise the turn limit so it finds the answer eventually.
  2. BAppend every tool result to the history before the next request.
  3. CLower the temperature so it stops repeating.
  4. DSet tool_choice to any so it always picks a tool.
Show the answer

Answer: B

  • A More turns give more repeats.
  • B Correct. The model reads the history, so a result it never sees is a call it repeats.
  • C Temperature does not show the model a result.
  • D It picks a tool again, blind to the last result.

23. A loop ends after 5 turns because the cap is 5, even when the work is unfinished. How should the cap be treated?

  1. AAs a safety net, with the model's end_turn as the stop rule.
  2. BAs the main stop rule, tuned for each job.
  3. CAs a way to set the answer length.
  4. DAs the retry count for failed tool calls.
Show the answer

Answer: A

  • A Correct. The cap guards against a runaway loop and should rarely be reached.
  • B A tuned number still cuts off jobs that need more turns.
  • C A turn cap does not shape length.
  • D Retries are a separate, bounded policy.

24. Select two facts about what drives an agentic loop.

  1. AThe code picks the next tool from a fixed list.
  2. BThe model picks the next tool from the history.
  3. CThe history is cleared after every tool call.
  4. DEach tool result joins the history before the next model call.
Show the answer

Answer: B, D

  • A A fixed list is a script, not a loop.
  • B Correct. Choosing the next step is the model's part of the loop.
  • C A cleared history would lose every result.
  • D Correct. That is how the model sees what its call did.

Play: spot the bug

This researcher has a clear job, and its prompt says only to search.

python
"researcher": AgentDefinition(
    description="Researches one angle of a product recall.",
    prompt="Search for your angle and report findings with sources.",
)

Predict: Which tools can a researcher call?

  1. AEvery tool open to subagents, Bash and Write included.
  2. BOnly search tools, since its prompt asks only for a search.
Show the answer

A. When tools is left out, the subagent inherits every tool it can be given. List the tools it needs, such as WebSearch and WebFetch, so a researcher cannot write files.

References

Conclusions

  • A coordinator plans angles that cover the whole topic, then checks for a gap.
  • Independent researchers are spawned in the same response, so they run together.
  • A researcher knows only its brief, so the brief names its goal and the reply shape.

You can now split a research task into angles, spawn researchers together, and give each role only its tools.

Coordinator

The agent that plans the angles and joins the findings

Subagent

A helper with its own context, prompt and tool list

Angle

One question a researcher answers for the whole report

Coverage gap

An angle with no findings, named in the report