Claude Partner Certificate — 1 · Agentic Architecture
CC — 03

Domain 1 · Agentic Architecture & Orchestration

This is the biggest block of marks. It covers how an agent loop runs, how a coordinator manages subagents, which rules belong in code instead of prompts, and how sessions are resumed or forked.

Read time12 min
Exam weight27%
Tasks1.1 to 1.7
SectionClaude Partner Certificate

Videos: Ep 01 to Ep 05

Key terms: Agent: Claude working in a loop with tools. Tool: an action Claude can ask your code to run. Coordinator and subagent: a manager agent and the specialists it delegates to. Hook: your code that runs before or after a tool call. Session: one saved conversation.

01 — task 1.1

1.1 Design and implement agentic loops

What it is: An agent is Claude working in a loop. You send a request plus a list of tools, and Claude replies either with an answer (end_turn) or with a request to use a tool (tool_use). Claude only asks: when you build an agent, the program you write (or the SDK, or Claude Code for you) runs the tool, adds the result to the conversation and calls Claude again, until Claude says end_turn.

The exam tests: how stop_reason controls the loop, how tool results flow back to Claude, and which wrong ways of ending a loop to avoid. Video: Ep 01.

The basics behind every agent

RoleWho it is
System roleSystem-level settings
User roleThe end user. Tool results also go back to Claude in a user message
Assistant roleClaude
How it works
ChatYou send a message, Claude responds, done
AgentYou send a message, Claude reasons and acts with tools, reads the results, and reasons again until it is finished
Tool definition fieldWhat it holds
nameWhat Claude calls the tool by
descriptionWhen to use the tool
input_schemaA JSON schema describing the tool's parameters
StepWhat the messages array holds
1The user message
2Adds the assistant message with tool_use
3Adds the user message with the tool_result
4Adds the assistant message with end_turn

Every call re-sends the whole array, because the API is stateless.

The loop repeats until stop_reason is end_turn

flowchart LR A["1. Send request<br/>call API with messages + tools"] --> B["2. Inspect stop_reason<br/>tool_use or end_turn"] B -- end_turn --> E["Exit<br/>return final answer"] B -- tool_use --> C["3. Execute<br/>run the tool"] C --> D["4. Append<br/>add result to history"] D --> A

Full notes

Rule: Continue the loop while stop_reason is tool_use. Terminate it when it is end_turn.

Rule: The Claude API is stateless. Every call must carry the complete conversation history, including earlier tool results.

Rule: A tool_use reply is never the final answer and never goes to the user. Run the tool, add the result to the conversation, and call Claude again.

Rule: Claude decides which tool to call next from context. Hardcoded decision trees or fixed tool sequences push the intelligence into your code instead.

✗
Trap
Three wrong ways to end a loop: parsing the model's language for a "done" signal, using an iteration cap as the main stop, or treating text content as a sign the task is finished.

Deep dive

  • Ep 01 at 26:44: why the messages array matters.
  • Ep 01 at 36:52: the loop code: on tool_use, append the assistant message, run the tools, and send the results back.
  • Ep 01 at 38:02: the tool result goes back with the user role.
  • Ep 01 at 45:04: the three anti-patterns: parsing the model's wording, using an iteration cap as the main stop, and checking content type.
  • Ep 01 at 48:20: the lesson's cheat sheet.
02 — task 1.2

1.2 Orchestrate multi-agent systems with coordinator-subagent patterns

What it is: Instead of one agent doing everything, a coordinator agent splits a big job into pieces and hands each piece to a specialist subagent. The subagents report back to the coordinator, never to each other, and the coordinator combines their results into one answer.

The exam tests: hub-and-spoke design, isolated subagent context, the coordinator's duties, and the risk of splitting a topic too narrowly. Video: Ep 02.

All traffic flows through the coordinator

flowchart TB C(["Coordinator<br/>routes everything"]) C <--> S1["Subagent"] C <--> S2["Subagent"] C <--> S3["Subagent"] C <--> S4["Subagent"]

Subagents never talk to each other directly: there is no subagent-to-subagent link.

Full notes

Rule: Hub-and-spoke: all communication runs through the coordinator, so you get observability, consistent error handling and controlled information flow. Subagents never talk to each other directly.

Rule: Subagents work with isolated context. They do not inherit the coordinator's conversation history.

Rule: The coordinator has four jobs: error handling, task decomposition, delegation and result aggregation. It picks which subagents to call based on query complexity instead of always running the full pipeline.

Rule: Split the research scope so subagents do not duplicate work, for example by subtopic or by source type. After synthesis, the coordinator checks for gaps, sends targeted follow-up queries, and re-runs synthesis until coverage is enough.

✗
Trap
A broad topic broken into subtasks that cover only one slice of it. Every subagent can succeed and the report is still incomplete. The cause is the coordinator's decomposition, not the downstream agents.

Deep dive

03 — task 1.3

1.3 Configure subagent invocation, context passing and spawning

What it is: A coordinator starts a subagent by calling a special tool, the Task tool, and describing the subagent in an AgentDefinition (its role, prompt and allowed tools). A new subagent knows nothing: it cannot see the coordinator's conversation, so everything it needs must be written into its prompt. Independent subagents can run at the same time.

The exam tests: how the Task tool spawns subagents, what must go into a subagent's prompt, and how to run subagents in parallel. Videos: Ep 03 and Ep 04.

Full notes

Rule: The coordinator spawns subagents through the Task tool, so its allowedTools must include "Task".

Rule: Subagents start with a blank slate and share no memory between calls. Put the complete findings from earlier agents directly in the subagent's prompt.

Rule: An AgentDefinition describes each subagent type: its description, system prompt and tool restrictions. In the course's payload view the fields are description, prompt, allowed tools and model.

Rule: Pass structured data that keeps content apart from metadata (source URLs, document names, page numbers), so attribution survives the hand-off.

Rule: For parallel subagents, emit several Task calls in one coordinator response. Total time is then the slowest subagent, not the sum of all of them.

Rule: Give subagents goals and quality criteria instead of step-by-step procedures, so they can adapt.

✗
Trap
Spawning independent subagents one per turn. The work runs one after another, and a system that is about 3x slower than expected is often doing exactly this.

Deep dive

04 — task 1.4

1.4 Implement multi-step workflows with enforcement and handoff patterns

What it is: Some steps must happen in a fixed order, such as verifying a customer before issuing a refund. A prompt asking for that order works most of the time, but code that blocks the next step until the earlier one has succeeded works every time. When a case must go to a person, the agent also hands over a clear summary, because the human cannot see the conversation.

The exam tests: when code must enforce the order of steps instead of a prompt, and how to hand a case to a human. Video: Ep 05.

Full notes

Rule: If a rule must always hold, enforce it in code with hooks or prerequisite gates. Prompt instructions alone have a non-zero failure rate.

Rule: A prerequisite gate blocks a downstream tool until the upstream tool has finished and set a verified flag. For example, process_refund cannot run until get_customer has returned a verified customer ID.

Rule: Split a multi-concern request into distinct items, investigate each one (in parallel, with shared context), then combine the results into one resolution.

Rule: When escalating, compile a structured handoff summary (customer ID, root cause, refund amount, recommended action). The human agent cannot see the transcript.

✗
Trap
Adding "always verify the customer first" to the system prompt, or to few-shot examples, when a mistake has financial consequences.

Deep dive

05 — task 1.5

1.5 Apply Agent SDK hooks for tool call interception and data normalization

What it is: A hook is a small piece of your code that Claude cannot skip or override. It runs just before a tool is called, to check or block the call, or just after, to clean up the result before Claude reads it. Hooks are how you guarantee a rule instead of hoping the prompt is followed.

The exam tests: what hooks do before and after a tool call, and why they beat prompts for guaranteed compliance. Video: Ep 05.

Hooks sit on both sides of every tool call

flowchart LR A["Model asks<br/>to use a tool"] --> B["PreToolUse<br/>before the tool runs: guardrails"] B --> C["Tool runs<br/>real execution"] C --> D["PostToolUse<br/>normalize and clean the data"] D --> E["Model sees<br/>the result"]

Hooks are code interceptors: the model cannot override them.

Full notes

Rule: A PostToolUse hook runs after the tool and before the model sees the result. Use it to normalize formats such as Unix timestamps, ISO 8601 dates and numeric status codes.

Rule: A hook on outgoing tool calls (the PreToolUse side) can block a policy-breaking action, such as a refund above $500, and redirect it to a human escalation workflow.

Rule: Hooks give deterministic guarantees. Prompts give probabilistic compliance. When a business rule must always hold, pick the hook.

✗
Trap
Relying on prompt wording for a rule that must never be broken.

Deep dive

  • Ep 05 at 08:23: the two hook points, PreToolUse and PostToolUse.
  • Ep 05 at 10:11: the PostToolUse hook and data normalization.
  • Ep 05 at 17:10: a PreToolUse hook that blocks a policy-breaking call.
  • Ep 05 at 43:52: the episode's summary, including why prompts keep a non-zero failure rate.
06 — task 1.6

1.6 Design task decomposition strategies for complex workflows

What it is: Decomposition means breaking a big task into smaller steps. If you already know the steps (review every file, then check how the files fit together), you fix them in advance as a chain of prompts. If you do not (finding the cause of a bug), Claude plans as it goes and adds steps based on what it discovers.

The exam tests: choosing between a fixed pipeline and an adaptive plan. Video: Ep 05.

Prompt chainingDynamic decomposition
StepsDefined up frontEmerge from findings
ControlHigh, deterministicLower, the model navigates
Best forCode reviews, audits, batch reportsBug investigation, codebase exploration
ExampleCI/CD review pipelineMonolith to microservices migration

Full notes

Rule: Use prompt chaining for predictable, multi-aspect work. Use dynamic decomposition for open-ended investigation: map the structure, find the high-impact areas, then build a prioritized plan that adapts as dependencies appear.

Rule: Split large reviews into per-file passes for local issues, plus a separate cross-file pass for integration issues. This avoids attention dilution.

✗
Trap
Forcing a fixed pipeline onto an open-ended task, such as "add tests to a legacy codebase".

Deep dive

07 — task 1.7

1.7 Manage session state, resumption and forking

What it is: A session is one running conversation with Claude. You can return to a saved session by name (resume), copy it into a separate branch to try a different idea (fork), or start a new one with a short summary when the old one has gone out of date.

The exam tests: when to resume, fork or start fresh. Video: Ep 03.

Resume, fork or start fresh

flowchart TB Q1{"Are the prior tool results still valid?"} Q1 -- no --> F["Start fresh<br/>inject a structured summary"] Q1 -- yes --> Q2{"Compare two approaches from one shared baseline?"} Q2 -- yes --> K["Fork<br/>fork_session for a branch"] Q2 -- no --> R["Resume<br/>--resume session-name, say what changed"]

Full notes

Rule: --resume <session-name> continues a named session, and plain --resume continues the last one.

Rule: fork_session makes an independent branch from a shared baseline, so you can compare two approaches without exploring twice.

Rule: When you resume after code changes, tell the agent which files changed so it re-analyzes only those.

Rule: If earlier tool results are stale, start a new session with an injected structured summary. Frame it as hypotheses to check, not as established facts.

✗
Trap
Using fork for a one-time targeted file update, or resuming a session whose tool results are out of date.

Deep dive