# Anthropic's CCA Exam as a Field-Guide for Agentic Engineering

Frank Coyle

AI Engineer World's Fair 2026

[Talk page](https://ai.engineer/talks/Z-c11pV_uvU-anthropics-cca-exam-as-field-guide-agentic) · [Video](https://www.youtube.com/watch?v=Z-c11pV_uvU)

## Anthropic’s CCA Exam as a Field Guide for Agentic Engineering

Frank Coyle uses certification scenarios to explore the practical work of agent engineering: controlling tool loops, scoping instructions, isolating context, and running unattended workloads.

Familiarity with basic Python control flow, chat-model messages, and command-line development will help with the tool-loop and Claude Code examples.

### Preparing for agentic work by making things

[0:15](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=15s)

How do you prepare computer science students for a job market in which their degree no longer guarantees a path to employment? Frank Coyle, who introduces himself as a longtime computer science educator now teaching at Berkeley, approaches that question through practical agent engineering. The [Claude Certified Architect exam](https://www.anthropic.com/news/claude-partner-network) provides a syllabus: its scenarios expose the kinds of decisions developers face when building with **Claude**. Coyle’s rationale is that Anthropic sees how customers use its systems—and where those systems cause trouble.

The preparation starts with experimentation. Coyle quotes Sister Corita Kent: “Nothing is a mistake. There's no win and no fail. There's only make.” Reading supplies concepts; making something forces you to discover what those concepts leave unresolved. A failed attempt still teaches you how the system behaves.

![Teaching philosophy slide quoting Sister Corita Kent: “Nothing is a mistake. There's no win and no fail. There's only make,” above three practice cards.](https://ai.engineer/api/talk-essay-media/5cc2a535bf064583660b244e74d1e61cc04285167ec334a5a306b516f700307a)

Experiment freely, build to understand, and iterate without fear.

Coyle follows with the saying he attributes to Thomas Edison about finding ten thousand ways that do not work. That connects experimentation to the object-oriented design-pattern movement of the early 1990s. Agent engineering also has recurring patterns, but **anti-patterns are especially useful diagnostic tools**: understanding why a design fails helps distinguish plausible solutions from appropriate ones.

### The exam’s engineering map

[2:44](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=164s)

The certification launched in March 2026 with partner access. Coyle describes a timed, proctored exam and reports individual access for $99, with an attempt once every six months; those access terms are his account, not established here as current registration policy. The questions are multiple choice, but their difficulty comes from realistic scenarios and constraints rather than isolated terminology.

The five domains span orchestration, development workflows, structured output, tools, and reliability. Coyle’s domain slide gives the following allocation:

| Domain | Exam weight |
| --- | ---: |
| Agentic architecture and orchestration | 27% |
| Claude Code configuration and workflows | 20% |
| Prompt engineering and structured output | 20% |
| Tool design and MCP integration | 18% |
| Context management and reliability | 15% |

These topics connect directly to implementation: configuring Claude Code, expressing outputs as JSON, integrating tools through Model Context Protocol, and controlling what enters the context window. They remain useful areas of study whether or not you sit the exam.

![Horizontal bars show Agentic Architecture and Orchestration at 27%, Claude Code Configuration and Workflows at 20%, Prompt Engineering and Structured Output at 20%, Tool Design and MCP Integration at 18%, and Context Management and Reliability at 15%.](https://ai.engineer/api/talk-essay-media/9052c17613c94d470ded19742a979704a5f6dc67a020068a9b9937640cff47ae)

The five exam domains and their percentage weights.

### Six scenarios, recurring design decisions

[4:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=253s)

Coyle says each exam selects four of six production scenarios at random and centers its questions on those four. His walkthrough uses anti-patterns to identify what makes a solution unsuitable under a scenario’s constraints.

The scenarios introduce a recurring set of boundaries:

1. **Customer support resolution:** control the agent loop and inspect `stop_reason` rather than treating every returned response as finished.
2. **Code generation:** configure Claude Code for the project it is working in.
3. **Multi-agent research:** decide how specialists report to an orchestrator, whether to use a hub-and-spoke arrangement, and how much information each participant needs.
4. **Developer productivity:** isolate subtasks. Coyle compares this to multithreaded programming: shared memory creates synchronization and locking problems, while independent work reduces coordination requirements.
5. **Continuous integration:** make Claude Code useful in automated pipelines.
6. **Structured data extraction:** produce structured results from source material.

Structured extraction appears in the scenario overview; the detailed walkthrough proceeds through CI before the closing remarks.

### Loops are an old source of new capability

[6:06](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=366s)

Coyle invokes Boris Cherny and OpenClaw’s Peter Steinberger as examples of developers describing their work increasingly in terms of designing loops that prompt agents. The emphasis feels new, but the underlying control structure is not. He recalls early disputes over the relative power of Fortran and COBOL, then turns to [Böhm and Jacopini’s 1966 paper](https://www.cs.unibo.it/~martini/PP/bohm-jac.pdf).

The familiar programming vocabulary is sequence, conditional selection, and iteration. Coyle uses it to explain the progression from a sequence of prompts, through conditional routing, to a loop that repeatedly acts on new results. The historical result assumes suitable operations and state; adding a loop alone does not establish that an arbitrary prompt system is Turing complete. The practical connection is that iteration lets a workflow use feedback to decide its next action instead of stopping after a predetermined sequence.

### Customer support: inspect why the model stopped

[7:51](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=471s)

For a customer support agent, the first anti-pattern is accepting a response simply because the model returned one. Coyle’s demonstration instead uses a `while True` loop: call the model, inspect why generation stopped, and decide what the application must do next. The request includes messages representing the conversation context, the task, and the available tools.

**A tool request is a proposal for execution.** In the client-tool arrangement Coyle demonstrates, the model prepares the tool name and parameters; application code performs the operation. This is the relevant boundary behind his statement that the model cannot execute tools itself. In current API terminology, [`stop_reason`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) is a Messages API response field, and this explanation concerns client tools rather than the separately supported server-side tools.

When `stop_reason` is `tool_use`, the application executes the requested tool, records its result, and calls the model again. Preserving both the assistant’s request and the corresponding tool result gives the next call the information needed to continue. The Python control flow can be expressed as follows, with tool execution supplied by the application:

```python
import json


def run_support_loop(client, model, messages, tools, run_tool):
    history = list(messages)

    while True:
        response = client.messages.create(
            model=model,
            max_tokens=2048,
            messages=history,
            tools=tools,
        )

        if response.stop_reason != "tool_use":
            return response

        history.append({
            "role": "assistant",
            "content": [block.model_dump() for block in response.content],
        })

        results = []
        for block in response.content:
            if block.type == "tool_use":
                value = run_tool(block.name, block.input)
                results.append({
                    "type": "tool_result",
                    "tool_use_id": block.id,
                    "content": json.dumps(value),
                })

        history.append({"role": "user", "content": results})
```

The application’s `run_tool` function owns dispatch and execution. The loop returns the whole response when it reaches a different stopping condition so the caller can inspect that condition before accepting the answer.

After a completed turn, Coyle proposes checking whether the answer is suitable and escalating to a human when it is not. He describes this as checking confidence, without specifying a score or threshold. Completion and acceptance are separate decisions.

Token limits create another branch. A response may be partial even though it contains plausible text. In current Messages API terminology, `max_tokens` means generation reached the requested output limit, not necessarily that the entire context window is exhausted. Treat `end_turn` as a completed model turn, `tool_use` as a request for further action, and `max_tokens` as a condition requiring recovery or review before using the output as a finished answer.

### Code generation: put instructions at the right scope

[11:12](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=672s)

Claude Code’s [`CLAUDE.md` files](https://code.claude.com/docs/en/memory) provide persistent Markdown instructions. Coyle presents a three-level hierarchy, illustrated on the slide as user, project, and directory scopes. Broad preferences belong near the top; project conventions and directory-specific guidance belong closer to the work they govern.

The hierarchy controls which guidance is available as the system works through a codebase. The slide summarizes conflicts as the most specific file winning. Treat that as Coyle’s framing rather than an enforced precedence mechanism: current Claude Code documentation describes additional scopes, loads nested instructions when relevant files are read, and treats these files as model context rather than hard configuration rules. The useful design principle is to keep instructions scoped to the work they describe.

![Code Generation with Claude Code slide showing three scoped CLAUDE.md examples and a note that the most specific file wins on conflicts.](https://ai.engineer/api/talk-essay-media/74d96bbfa1bb8d7a767fa33dd8eb512912dd770b052fbc99621464314a5346a3)

CLAUDE.md instructions at user, project, and directory scope.

### Research agents: specialize the work and limit the context

[11:59](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=719s)

A multi-agent research system must get useful work back from its agents without turning every agent into a generalist. Coyle’s anti-pattern is one agent loaded with tools for everything. His analogy is hiring a carpenter who arrives with plumbing, electrical, and carpentry equipment and promises to do any job. For a carpentry task, a specialist may be the better fit.

The corresponding software principle resembles a function that does one thing. Coyle recommends narrow agent responsibilities, perhaps with one or two tools available to each specialist. He then extends the boundary to context: a worker’s accumulated material should not automatically spill into the main conversation. More context consumes tokens, and irrelevant material can make the next decision harder. A large context window is capacity, not an instruction to fill it.

The critic agent makes this concrete. After an agent produces a claim, pass the critic **the claim and its evidence**, without the thought process that produced the claim. The critic has what it needs to evaluate support while receiving less material that might steer it toward the original agent’s conclusion.

Coyle describes the failure mode as groupthink: agents collaborating through a shared conversation can converge on one idea. His analogy is a party where everyone wants pizza except one person, who eventually goes along. Giving each agent its own informational slice is intended to preserve independent evaluation. The boundary is selective: the critic still needs the evidence, just not the entire conversation that led to the proposal.

### Developer productivity: fork, summarize, compact

[15:12](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=912s)

The developer-productivity scenario applies the same boundary to long sessions. Two anti-patterns reinforce each other: allowing every subtask to dump its complete output into the primary thread, and allowing that thread to grow without limit. Isolate the subtask first, then decide what information should return.

Coyle’s example is log analysis: scan the logs for errors in a separate context. In current Claude Code [skills](https://code.claude.com/docs/en/skills), `context: fork` is skill frontmatter that requests subagent execution. A skill for that task can carry an actionable instruction:

```markdown
---
name: summarize-log-errors
description: Scan project logs and summarize errors.
context: fork
---

Scan the project logs for errors.
Return a concise summary of the problems, with representative
log lines and file locations. Do not return the complete logs.
```

The separate context holds the worker’s investigation instead of adding all of it to the primary conversation.

The worker returns a summary of the problems, which the main conversation can use without absorbing the full intermediate output. Coyle then adds a second control: monitor context size and compact long sessions. His example invokes `/compact` above 150,000 tokens; that is an illustrative trigger, not a stated product default. Compaction reduces accumulated context, but Coyle explicitly says he does not know the implementation of Anthropic’s algorithms.

That leads to application-specific compression. Coyle points to a book by Sam Bhagwat being distributed at the event, noting that he has no connection to its author. He recalls a passage around page 32 describing custom context-compression logic and a base class developers can extend. The architectural opportunity is to preserve what matters to the application when compressing its data, rather than assuming every detail deserves equal space.

### CI and batch work: match execution to who is waiting

[18:07](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1087s)

Continuous integration exposes a different anti-pattern: an interactive agent waiting for answers in an unattended pipeline. Permission questions that make sense at a developer’s terminal can stall a job when nobody is there to respond. Coyle recommends configuring noninteractive execution; the engineering requirement is to establish the permitted work before the pipeline runs.

For deferrable work, the [Message Batches API](https://claude.com/blog/message-batches-api) offers a separate cost tradeoff. Asynchronous Message Batches requests receive a 50% discount on input and output token prices relative to standard API calls. This is cheaper processing of tokens, not a reduction in the number of tokens used, and it is an API service rather than a generic Claude Code batch mode. Coyle’s spoken timing is “at least twenty-four hours,” but the slide shows `≤24h` and the service announcement specifies processing within 24 hours.

![Claude Code for CI/CD slide with side-by-side synchronous and batch code panels; the batch heading reads “async, 50% off, ≤24h.”](https://ai.engineer/api/talk-essay-media/cbb772100af7d16f531c0a6a35f7886005de924320b2ec8bb60275718c646e6e)

Headless when someone waits; batch when nobody does.

The distinction is whether the work can wait. A pipeline with someone waiting for its result needs an unattended path without unnecessary delay. A collection of prompts that can finish while the developer takes a nap, takes a day off, or goes on vacation can trade immediacy for lower token prices.

### There’s no exam, only make

[19:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1153s)

Coyle closes by adapting the opening quotation: “there's no exam, only make.” The certification supplies problems to practice, but building is the work that turns them into understanding. He invites readers to stay in contact and points them to his website, `codesupremeai`. The name reflects his enthusiasm for jazz and John Coltrane’s *A Love Supreme*: an appropriately personal ending to a field guide built around experimentation.

## Resources

- [Claude certification launch announcement](https://www.anthropic.com/news/claude-partner-network) — Anthropic's March 2026 announcement introducing the architect certification and its initial availability to partners.
- [Introducing the Message Batches API](https://claude.com/blog/message-batches-api) — The original announcement explains asynchronous batch requests, the 24-hour processing window, and discounted input and output pricing.
- [Handling Claude API stop reasons](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) — Current guidance for distinguishing completed responses, tool requests, and truncated output in an application-controlled loop.
- [CLAUDE.md scope and loading](https://code.claude.com/docs/en/memory) — How to organize personal and project instructions, including ancestor and nested CLAUDE.md files.
- [Run Claude Code skills in a subagent](https://code.claude.com/docs/en/skills) — Skill configuration and examples, including context: fork for isolated task execution.
- [Böhm and Jacopini's 1966 paper](https://www.cs.unibo.it/~martini/PP/bohm-jac.pdf) — The original May 1966 paper on flow-diagram normalization and expressing Turing-machine computations through composition and iteration.
- [Principles of Building AI Agents](https://mastra.ai/books/principles-of-building-ai-agents) — Sam Bhagwat's practical guide to agents, tools, memory, workflows, and multi-agent systems.

## Slides

### The Claude Certified Architect (CCA) Exam

Frank Coyle introduces the CCA exam as a field guide to agentic systems, drawing on his work helping students prepare for agentic AI.

[0:29](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=29s) [Title slide for Frank P. Coyle’s field guide to the CCA exam and agentic systems.](https://assets.ai.engineer/sites/aiecode2025/sha256/89d58cd6e2537659defaa1ad29abd178a848f4bc0c167016c4946cb96520775d.webp)

ANTHROPIC CERTIFICATION · FIELD GUIDE

The Claude Certified Architect (CCA) Exam

Inside the CCA Exam: A Field Guide to Building Agentic Systems

Frank P. Coyle, PhD
UC Berkeley

AI Engineer World's Fair
July 3, 2026

Interface text:
View
153%
Zoom
Add Slide
Play
Table
Chart
Text
Shape
Media
Comment
Share
Format
Animate
Document
Slide Layout
DEFAULT
Appearance
Title
Body
Slide Number
Background
Standard
Dynamic
Current Fill
Color Fill
Edit Slide Layout

### My Teaching Philosophy

Coyle uses Sister Corita Kent’s Rule 6 to frame learning AI as hands-on experimentation: run and break code, learn from it, and keep iterating.

[1:34](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=94s) [A Corita Kent quotation introduces experimenting freely, building to understand, and iterating without fear.](https://assets.ai.engineer/sites/aiecode2025/sha256/a4472840e2037e33119cd284d716be87dcd6b6db607b994b7bfef8805547bf88.webp)

MY TEACHING PHILOSOPHY

Nothing is a mistake.
There's no win and no fail.
There's only make.

Sister Corita Kent · Rule 6, Some Rules for Students and Teachers (1967)
artist, educator, and nun — popularized by composer John Cage

Experiment freely
Run the code, break it, learn from what happens.

Build to understand
We learn AI by making with it — not just reading about it.

Iterate without fear
No final grade on a first attempt; only the next version.

Interface text:
View
Zoom 153%
Add Slide
Play
Table
Chart
Text
Shape
Media
Comment
Share
Format
Animate
Document
Slide Layout: DEFAULT
Appearance
Title
Body
Slide Number
Background
Standard
Dynamic
Current Fill
Color Fill
Edit Slide Layout

Before we get into the exam, a word on how I teach — because it shapes how I'll present all of this.

This is Rule 6 from Sister Corita Kent — an artist, educator, and nun who ran the art department at Immaculate Heart College in the 1960s. The composer John Cage loved these rules and popularized them, which is why they're often misattributed to him. But they're hers.

### When You Get Stuck — That’s Data

Failed approaches narrow the space of possible solutions. The slide proposes turning anti-patterns into explicit guardrails with ontologies and OWL.

[1:59](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=119s) [An Edison quotation and three cards explain how anti-patterns can guide constraints.](https://assets.ai.engineer/sites/aiecode2025/sha256/63c250c514739559efe2b7cbc75eaedb14eefe9ea79498552ee72c91bb11875b.webp)

WHEN YOU GET STUCK — THAT'S DATA

I have not failed. I've just found 10,000 ways that won't work.

attributed to Thomas Edison (popular paraphrase of his documented “I know several thousand things that won't work”)

With LLMs, a dead end is progress. We may not yet know the way — but every anti-pattern tells us what is not the way, and that narrows the path.

Anti-patterns are signal
Each wrong approach you rule out shrinks the space of what could be right.

Negation maps the terrain
Knowing what doesn't work is its own kind of knowledge — the via negativa.

Then constrain it
Ontologies and OWL turn “not the way” into explicit guardrails. (More in my agents talk.)

“All determination is negation.” — Spinoza. To define what a thing is, is to draw its boundary against what it is not.

Interface text:
View · Zoom · 153% · Add Slide · Play · Table · Chart · Text · Shape · Media · Comment · Share · Format · Animate · Document
Slide Layout · DEFAULT
Appearance · Title · Body · Slide Number
Background · Standard · Dynamic · Current Fill · Color Fill
Edit Slide Layout

Second philosophy beat — and the bridge into the heart of the talk.

Edison's line: 'I have not failed, I've just found 10,000 ways that won't work.' Quick honesty note for this crowd — that's the popular paraphrase; what's actually documented is 'I know several thousand things that won't work.' Same idea, and he clearly said something of this type.

### The Claude Certified Architect (CCA) Exam

The CCA Foundations exam uses 60 multiple-choice questions in 120 minutes to test architectural judgment in realistic production scenarios. A passing score is 720 on a scaled 100–1,000 range.

[2:43](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=163s) [Exam overview covering its release, timed scenario-based questions, and architectural judgment.](https://assets.ai.engineer/sites/aiecode2025/sha256/1e381b0da6576e2a0ef3c3c2ca8e42bc2c16dd9f2bc0c428f6f55d1f11313c50.webp)

The Claude Certified Architect (CCA) Exam

1. Released March 12, 2026
Anthropic's first official technical certification (Foundations / CCA-F), part of the Claude Partner Network.

2. Scenario-based and timed
60 multiple-choice questions in 120 minutes, with a passing score of 720 on a scaled 100–1,000 range.

3. Judgment under realistic constraints
Every question drops you into a production situation — a broken loop, a poorly scoped tool, a system under load — and asks for the best architectural call. You cannot memorize your way through it.

The takeaway: the exam is a curriculum in disguise — what it tests is what production agentic systems actually demand.

Interface text:
View; Zoom; 153%; Add Slide; Play; Table; Chart; Text; Shape; Media; Comment; Share; Format; Animate; Document
Slide Layout: DEFAULT
Appearance: Title; Body; Slide Number
Background: Standard; Dynamic
Current Fill; Color Fill
Quick orientation before we dive into the scenarios. It’s a Curriculum
Released March 12, 2026 — Anthropic's first technical cert, the Foundations level, gated through the Partner Network at launch.
Edit Slide Layout

### The Five Exam Domains

Agentic architecture and orchestration carries the most weight at 27%, followed by Claude Code workflows and prompt engineering at 20% each. Tool design accounts for 18% and context reliability for 15%.

[3:22](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=202s) [Five exam domains ranked by weight, from agentic architecture and orchestration at 27% to context management and reliability at 15%.](https://assets.ai.engineer/sites/aiecode2025/sha256/e861e6c90ebe33d7bd403d20c7018813f2264dba34b3879c3fe6ee3d98ddc482.webp)

The Five Exam Domains
Weighted by share of the exam

DOMAIN 1
Agentic Architecture & Orchestration — 27%
Loops and control flow; stop_reason — when to end vs. continue; guardrails and enforcement via hooks.

DOMAIN 3
Claude Code Configuration & Workflows — 20%
CLAUDE.md hierarchy; custom commands and skills; CI/CD and batch use; automation and repeatable execution.

DOMAIN 4
Prompt Engineering & Structured Output — 20%
Clear instructions, constraints, and success conditions; structured output via tool_use and JSON schemas.

DOMAIN 2
Tool Design & MCP Integration — 18%
Make tools explicit, narrow, and easy to select correctly; structured errors; MCP server setup and configuration.

DOMAIN 5
Context Management & Reliability — 15%
Context positioning — what to place early vs. late; long-session reliability: summarization, degradation risks, refresh strategies.

Read the weights: architecture and orchestration is the heaviest slice — agentic AI is a systems-design problem first.

Interface text:
View; Zoom; 153%; Add Slide; Play; Table; Chart; Text; Shape; Media; Comment; Share; Format; Animate; Document
Slide Layout: DEFAULT
Appearance: Title; Body; Slide Number
Background: Standard; Dynamic
Current Fill; Color Fill
Edit Slide Layout

Presenter notes:
The five domains, ordered by weight — and the weighting itself tells a story.
Domain 1, Agentic Architecture & Orchestration, is 27% — more than a quarter of the exam. Loops, control flow, stop_reason, guardrails via hooks. The single heaviest area.

### The Six Production Scenarios

The exam randomly selects 4 of 6 scenarios, and every question is anchored to one. They range from customer support and multi-agent research to Claude Code workflows and structured extraction. The pool may expand.

[4:11](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=251s) [Six cards summarize production scenarios for customer support, coding, research, productivity, CI/CD, and data extraction.](https://assets.ai.engineer/sites/aiecode2025/sha256/f03eaa9a13922d11b0fcabc8cc585483555cce94257bd8b3c898723178539c16.webp)

The Six Production Scenarios
4 of 6 drawn per exam

SCENARIO 1 — D 1 · 5
Customer Support Resolution Agent
Agentic loop control, stop_reason handling, and escalation to a human.

SCENARIO 2 — D 2 · 3
Code Generation with Claude Code
CLAUDE.md hierarchy, plan mode, and scoped project context.

SCENARIO 3 — D 1 · 5
Multi-Agent Research System
Hub-and-spoke orchestration, tool budgets, and context isolation.

SCENARIO 4 — D 3 · 5
Developer Productivity with Claude
Subtask isolation, context compaction, long-session reliability.

SCENARIO 5 — D 3 · 5
Claude Code for CI/CD
Headless -p execution, JSON output, batch vs. blocking latency.

SCENARIO 6 — D 4 · 5
Structured Data Extraction
Schema enforcement via tool_use, validation, and confidence gates.

On exam day: 4 of these 6 are chosen at random and every question is anchored to them. (Anthropic may expand the pool — verify the current Exam Guide.)

Interface text:
View
153%
Zoom
Add Slide
Play
Table
Chart
Text
Shape
Media
Comment
Share
Format
Animate
Document
Slide Layout
DEFAULT
Appearance
Title
Body
Slide Number
Background
Standard
Dynamic
Current Fill
Color Fill
Edit Slide Layout

Speaker notes:
These six production scenarios are the backbone of the exam — and the structure of the rest of my talk.

On any given sitting, 4 of the 6 are randomly selected, and EVERY question is anchored to one of those scenarios. You're never answering in a vacuum — you're answering as the architect of a specific production system.

### CS Keeps Rediscovering the Loop

The slide connects Böhm–Jacopini’s sequence, conditional and loop to quotes from Boris Cherny and Peter Steinberger, framing the focus on agent loops as a rediscovery.

[6:05](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=365s) [A diagram links sequence, conditional, and loop to quotations about designing agent loops.](https://assets.ai.engineer/sites/aiecode2025/sha256/3607c38fd41ee728a04ebd2abe61aef2fe66770c6bfefbb7524682554bbf800d.webp)

CS keeps rediscovering the loop

BÖHM–JACOPINI (1966) — every computation needs three things

SEQUENCE
do this, then that

CONDITIONAL
if / then

LOOP
repeat until done

60 years later ↓

THE NEW PARADIGM IS THE LOOP

“My job is to write loops.”
Boris Cherny · creator of Claude Code, Anthropic

“Design loops that prompt your agents.”
Peter Steinberger · creator of OpenClaw

Interface text:
View · 153% · Add Slide · Play · Table · Chart · Text · Shape · Media · Comment · Share · Format · Animate · Document
Slide Layout: DEFAULT
Appearance: Title · Body · Slide Number
Background: Standard · Dynamic
Current Fill: Color Fill
Edit Slide Layout

Speaker notes: The cycle thesis: CS keeps rediscovering its own primitives. Böhm-Jacopini 1966 proved every computation reduces to sequence + conditional + LOOP — the structured programming theorem. Sixty years later the agentic world rediscovers the same triad and lands on the same keyword: the loop. Cherny (creator of Claude Code, Anthropic): ‘My job is to write loops.’ Steinberger (creator of OpenClaw, most-starred new repo in GitHub history): ‘design loops that prompt your agents.’ Both verified quotes, June 2026. The loop is the primitive that crosses into true computability — agents had sequence and conditionals, the loop is what's new. Next slide: but the loop is exactly where it breaks.

### Customer Support: Branching on Stop Reason

The loop runs the requested tool and feeds its result back on tool_use. On end_turn, it produces an answer and escalates low-confidence cases to a human.

[8:16](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=496s) [Python example branches on tool use or end turn and escalates low-confidence answers.](https://assets.ai.engineer/sites/aiecode2025/sha256/cc857f43681cba531f9ed1da302d9cd65ebba0140e049547619cb9f54c2c0e68.webp)

SCENARIO 1
Domains 1 · 5
Customer Support Resolution Agent

The agentic loop branches on stop_reason

PATTERN · PYTHON

while True:
    resp = client.messages.create(
        model="claude-sonnet-4-6",
        messages=messages, tools=tools)

    if resp.stop_reason == "tool_use":
        result = run_tool(resp)       # execute the tool, capture the response
        messages.append(result)       # feed it back to the model
        continue                      # loop again

    elif resp.stop_reason == "end_turn":
        answer = final_answer(resp)   # the model's resolution
        if low_confidence(answer):
            escalate_to_human(answer) # gate
        break                         # done

tool_use → run the tool and loop. end_turn → return. The loop never assumes; it reads.

Interface text:
View
Zoom
153%
Add Slide
Play
Table
Chart
Text
Shape
Media
Comment
Share
Format
Animate
Document
Slide Layout
DEFAULT
Appearance
Title
Body
Slide Number
Background
Standard
Dynamic
Current Fill
Color Fill
Edit Slide Layout

### Code Generation with Claude Code: Patterns

Scope CLAUDE.md instructions by user, project, and directory, and review a plan before non-trivial changes. The slide contrasts this with a single flat file and direct execution.

[11:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=673s) [Code generation patterns compare scoped instructions and planning with a flat instruction file and direct execution.](https://assets.ai.engineer/sites/aiecode2025/sha256/6f1a18b54a3bdfe4b63ce1a1e2ec443bc8e46f6eb561e02055dd88fb1d3c6c93.webp)

SCENARIO 2
Code Generation with Claude Code
Domains 2 · 3

PATTERN
What a sound architecture does

Use the CLAUDE.md hierarchy
Layer instructions by scope — user, project, then directory. Precedence is explicit, so rules live where they apply instead of in one tangled blob.

Plan before you execute
Use plan mode for non-trivial changes. The model proposes an approach you can review and gate before any code is touched.

ANTI-PATTERN
The tempting wrong answer

One flat instruction blob
Dumping every rule into a single CLAUDE.md with no scoping — directory-specific guidance bleeds into unrelated work and conflicts silently.

Direct-execute everything
Skipping plan mode on changes that need orchestration and review, so the agent edits first and surfaces problems after the damage is done.

Exam tell: answers that ‘just start coding’ or centralize all rules are traps — the right choice scopes context and gates work behind a plan.

Interface text:
View · Zoom · 153% · Add Slide · Play · Table · Chart · Text · Shape · Media · Comment · Share · Format · Animate · Document
Slide Layout · DEFAULT
Appearance · Title · Body · Slide Number
Background · Standard · Dynamic · Current Fill · Color Fill
Edit Slide Layout

Speaker notes:
Now the traps for Scenario 2.
• One flat instruction blob: Dumping every rule into a single CLAUDE.md with no scoping — directory-specific guidance bleeds into unrelated work and conflicts silently.
• Direct-execute everything: Skipping plan mode on changes that need orchestration and review, so the agent edits first and surfaces problems after the damage is done.

### CLAUDE.md: Rules at the Right Level

The example layers user, project, and directory CLAUDE.md files. When editing /api, all three apply; the slide says the directory rule wins conflicts.

[11:34](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=694s) [Example instruction files show user, project, and directory scopes and describe how they combine.](https://assets.ai.engineer/sites/aiecode2025/sha256/47415cd948782e2844090816d15c45e8279c19eb057cc99a6c90b6b8500e037c.webp)

SCENARIO 2
Domains 2 · 3
Code Generation with Claude Code

CLAUDE.md: the right rule lives at the right level

PATTERN · PYTHON

# Three files, three scopes — loaded together

~/.claude/CLAUDE.md        # USER (all projects)
  "Prefer type hints. Explain before editing."

myrepo/CLAUDE.md           # PROJECT
  "Use pytest. Never touch /legacy."

myrepo/api/CLAUDE.md       # DIRECTORY
  "All endpoints async. Validate with
   Pydantic v2 models."

# Editing in /api? All three apply — the
# directory rule wins any conflict.

Claude loads all three and merges them; the most specific file wins on any conflict.

Interface text:
View
Zoom 153%
Add Slide
Play
Table
Chart
Text
Shape
Media
Comment
Share
Format
Animate
Document
Slide Layout
DEFAULT
Appearance
Title
Body
Slide Number
Background
Standard
Dynamic
Current Fill
Color Fill
Edit Slide Layout

### Multi-Agent Research System: Patterns and Anti-Patterns

Give each agent a focused role and a small toolset, and share only the context it needs. The slide warns that too many tools can degrade routing, while sharing the coordinator’s reasoning can spread its biases.

[11:58](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=718s) [Compares specialized agents and isolated context with overloaded agents and shared reasoning.](https://assets.ai.engineer/sites/aiecode2025/sha256/ad73a78ab92c7aad8f7e8b192ea4c13bd1778dc317fdab55e04d940f64625044.webp)

SCENARIO 3
Domains 1 · 5
Multi-Agent Research System

PATTERN
What a sound architecture does

Specialize, don't overload
Give each agent a tight role and a small toolset. Past ~4–5 tools per agent, reasoning quality drops — split into subagents instead of growing one toolbelt.

Isolate subagent context
Hub-and-spoke: subagents receive only the slice they need, never the coordinator's full deliberation, so they don't inherit anchoring bias.

ANTI-PATTERN
The tempting wrong answer

One agent, every tool
Loading a single agent with a dozen tools and hoping it routes correctly — reasoning degrades and tool selection becomes unreliable.

Leak the full context
Passing the coordinator's entire reasoning trace down to every subagent, so each one inherits the same blind spots and biases.

Exam tell: bigger toolbelts and shared context look powerful but are usually wrong — the answer specializes agents and isolates what each one sees.

Interface text:
View
153%
Zoom
Add Slide
Play
Table
Chart
Text
Shape
Media
Comment
Share
Format
Animate
Document
Slide Layout
DEFAULT
Appearance
Title
Body
Slide Number
Background
Standard
Dynamic
Current Fill
Color Fill
Edit Slide Layout

Now the traps for Scenario 3.
• One agent, every tool: Loading a single agent with a dozen tools and hoping it routes correctly — reasoning degrades and tool selection becomes unreliable.
• Leak the full context: Passing the coordinator's entire reasoning trace down to every subagent, so each one inherits the same blind spots and biases.

## Full transcript

[0:00](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=0s) [outro jingle] Okay, getting rolling and, uh, welcome aboard.

[0:15](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=15s) Just had a little technical issues, but, uh, resolved them. So my name is Frank Coyle. Uh, I am a computer science guy. I've been teaching computer science for over thirty years, and I'm now teaching at Berkeley.

[0:28](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=28s) And one of the problems that, uh, all my students, past and present, are having is AI, because computer science is no longer the magic pathway to a job. So I've been trying to figure out ways to, uh, help them come up with schemes to help them get ready for this world of agentic AI.

[0:49](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=49s) And one of the things that sort of, uh, dropped into my, uh, plate was the-- something called the Claude Certified Architect Exam, which I will be talking about today, and it has, um, a number of aspects to it.

[1:03](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=63s) And I think if you're interested in a career in agentic AI to certainly take a look at least what the exam is about, because I feel that, uh, Anthropic knows how people are using their system and what the issues are gonna be.

[1:19](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=79s) So before we jump into that, I wanna give a little bit of my, uh, my philosophy.

[1:27](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=87s) Wup, wup, wup, wup. May have to do this manually. Getting stuck.

[1:36](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=96s) So this is a quote from, uh, a [REDACTED:gender] named Sister Corita Kent: "Nothing is a mistake. There's no win and no fail. There's only make." Bottom line here is experiment, experiment, experiment.

[1:52](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=112s) Not only should you read, but you should do. You should make stuff. Now, what happens when you make stuff? A lot of times things don't work.

[2:03](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=123s) Thomas Edison said, "I have not failed. I've only found ten thousand ways that don't work." And

[2:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=133s) w-what I want to emphasize here is that what this shows us are something that in the design patterns movement which came around in the early nineteen nineties with object-oriented programming, we had patterns for objects.

[2:27](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=147s) We now have patterns for agents, but there's also anti-patterns, and I think anti-patterns are a key to understanding what you should not do, because understanding what you should not do is the key to leading you to what you should do.

[2:44](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=164s) So a little bit about the Claude Certified Exam, released in, uh, March, so it's brand new. It is, uh, it is based on scenarios. It is timed. It is proctored.

[2:57](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=177s) It is available to companies in the Claude ecosystem, the Anthropic ecosystem, but individuals can pay ninety-nine dollars and take the exam once every, uh, once every six months. And it's not just multiple choice questions.

[3:15](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=195s) It is multiple choice, but they're so-- they are based on, uh, realistic constraints and realistic scenarios.

[3:24](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=204s) The five domains. There are five domains that are covered, and they give you the percentages of each. So agentic architecture, twenty-seven percent. Claude Code, how to configure the Claude Code system and workflow, twenty percent.

[3:39](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=219s) How to... Doing prompt engineering, structuring your output using JSON all over the place. Tool design. Model Context Protocol integration. These are topics that you should understand and know whether you're gonna take the exam or not.

[3:56](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=236s) This is gonna help you get ready for whatever the agentic world is gonna throw at you. And then there's gonna be context management and reliability. So these are the areas of, of the kind of questions you're gonna run into.

[4:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=253s) Then there are-- and they, they provide you with six production scenarios, and your-- the exam will randomly choose four, and all the questions will be centered around the four that they choose.

[4:29](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=269s) And what I'm gonna do is walk you through, um, the production scenarios and give you some anti-patterns to be aware of, because there's a number of ways you can solve the problem, but one of the big things is what not to do, and that often can be the key to getting these questions right.

[4:47](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=287s) So number one, customer support resolution agent. So we have agentic loops, control, something called stop_reason, which is, uh, what Claude Code has. Every time something happens, there's a stop_reason, and you need to take a look at that because that can give you a lot of information about what's going on.

[5:05](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=305s) Uh, scenario two, code generation. Three, multi-agent research system, which we'll look at. How do you, how do you distribute your agents? Hub and spoke? Who's the orchestrator? How much information should they know?

[5:20](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=320s) All these are im-important factors. Um, scenario four, developer productivity with code. So how do you do subtask isolation? Keep your tasks in their little universes. And this harkens back to what we learned in computer science from doing multi-threaded programming.

[5:39](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=339s) When you have multiple threads operating and sharing memory, then you get into issues with synchronization. You gotta put locks in. Keep the little threads independent. Keep your agents independent.

[5:53](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=353s) Um, and then some Claude Code for continuous integration, and then we'll look at some patterns for structured data extraction. Okay, that's kinda where we're gonna go.

[6:06](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=366s) Now, here's something that I, I, I like to point out. Everybody's talking about loops, right? Every-- The loop is the new thing. Um, uh, Boris Cherny says he doesn't write code, but his job is to write loops.

[6:22](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=382s) And Peter Steinberger, master of OpenClaw, says, "I don't, I don't, uh, I don't code anymore. I just design loops that prompt your agents." So loops are the new big thing, right?

[6:34](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=394s) Well, no, they're not. Okay? [chuckles] Um, back in the day,

[6:41](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=401s) uh, early days of computing, we had programming languages were exploding. We had Fortran, we had COBOL, and there were big fights. "My program, my programming language is better than yours.

[6:53](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=413s) It can do more." "No, it can't. We can do this." Böhm and Jacopini, nineteen sixty-six, proved that if you want a language to be Turing complete, which means can compute anything that computers are possibly able to compute, then you need only three things:

[7:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=433s) the ability to s- to, to write statements sequentially, okay? To have if-then conditionals, and the third piece is the loop. If you add the loop, you have Turing computability.

[7:28](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=448s) And now we are seeing this being resurrected in the agentic world with the focus on loops. 'Cause up to now, we've had sort of sequences. You have prompts. You have maybe if-then, but now we have a loop.

[7:42](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=462s) And now this is what's giving us the power. This is where the agentic stuff is getting very exciting. Okay.

[7:51](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=471s) Start with, uh, with scenario one, customer support resolution. So here we have

[7:59](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=479s) a loop operating and the... I'm gonna jump to the anti-pattern. What you don't want is just to let the agent go and do something and get the response back and

[8:11](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=491s) use it. Okay? What you wanna do is you want to loop with something called the stop_reason. So I'm gonna show you a little code here.

[8:19](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=499s) So here we have while loop. It's a while True. It's a loop. We're looping right here. Okay? So the first little block is where we call, uh, we call the model, okay?

[8:30](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=510s) And we pass it the messages. The messages are essentially the sequence of prompts that n- exist in the context window. Okay. And we are asking the... W- And we have a, we have a prompt, and we have, we have the context, and we have a tool.

[8:48](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=528s) And we're asking the LLM to do something with this tool and help us out. The problem is the LLM can't do anything. It is just a probabilistic next word predictor.

[9:01](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=541s) It can't execute tools. So what it does though is it can figure out.

[9:08](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=548s) If you point it to a tool, it can figure out how to set things up so that you or your code can execute it. So it's important to understand that the LLM is not executing these tools.

[9:20](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=560s) It can't do anything except talk back to you, very intelligently sometimes, but all it can do is talk back to you. So when it finishes this task and has a result, which is basically, "Here is...

[9:37](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=577s) I've s-- I know what you want. I know what the tool can do. Here's how," uh, it sets up the parameters that can then be, uh, then, then used to actually execute the tool.

[9:48](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=588s) So this second block, you see, why did the LLM come back to us? That's our stop reason. tool_use. Oh, okay. We've stopped because the, the LLM, it wants to use the tool.

[10:03](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=603s) So let's just run the tool. So that's what this second block is. run_tool. The response is what the LLM said, and it's basically the parameters that it has extracted from the data that you provided it.

[10:17](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=617s) Okay? Then it executes that. Then it goes back. Then, then it continues. continue means the LLM sees it, says, "Oh, successful run. So okay." Come back down.

[10:31](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=631s) We're not running a tool anymore. We're end-- ended our loop. Bingo. Now, then we take the answer, and this is an opportunity for you to have a human-in-the-loop potentially.

[10:43](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=643s) You check the confidence. If it looks good, you keep it. If you don't, then you escalate to a human. So, now there's another reason why you w- need to make sure you check your stop reason.

[10:55](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=655s) One of the stop reasons may be you have run out of tokens, and this response is based on partial when the LLM had to stop. And it's gonna give you a response, but if you have run out of tokens, then you need to take action.

[11:12](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=672s) Okay. Um, next scenario. Uh, code generation with Claude. So Claude Code has this co- has this concept of the CLAUDE.md file, a markdown file where you put all the things you want it to know.

[11:28](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=688s) What Anthropic recommends is you have three levels of CLAUDE.md. One that you have at the top level of your project, the other that you have in- inside your sort of, uh, the, the project folder, and then within directories you can also specify.

[11:48](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=708s) So the idea is to have a hierarchical set of rules that, that could then control how the system is gonna respond.

[11:59](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=719s) Okay. Moving right along. Uh, we have a multi-agent research system. So here we're gonna have, uh, the, the problem is-

[12:10](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=730s) How do I, how do I get my agents to, to go off and do stuff and bring the answers back in a reasonable way? The anti-pattern,

[12:18](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=738s) you have one agent and you load it up with tools, all right? So I like to think about you- you know, you hire somebody to come to your house, you hire a carpenter to come to the house, and the guy shows up with, uh, uh, uh, plumbing tools, carpenter tools, electrical tools.

[12:34](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=754s) He says, "I can do anything." Well, maybe you don't want this guy. Maybe you want a, a professional carpenter. So that's the kind of idea. And this kind of b- back-- takes us back to some of the, the functional programming, uh, ideas, that functions should be do one thing, and if you can get your agents to do

[12:53](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=773s) one thing, you... with maybe one or two tools available to it, then that's gonna be a win, and that's gonna help you with this exam. So specialize, don't overload.

[13:07](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=787s) The other part of this is don't let your agent's context s- spill over into the main context, because context means tokens, tokens mean money, and the more context you have, the more confused the LLM is gonna be in giving you an answer.

[13:27](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=807s) So even though, oh, a million token context window, I can put everything in there. No, no, don't put everything in there. Limit what's gonna go in there because then you're gonna get a much more accurate system.

[13:42](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=822s) So here's a, here's an example of a, uh, specialized sub-agents. You're giving it--

[13:50](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=830s) So this would be the critic. So let's say you've run some stuff. Now you wanna get an agent to look at what's happened. What you wanna do is just give it what it needs to solve that critic problem.

[14:03](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=843s) I'm only giving it here the, um, we're passing it the claim and the evidence. So this is-- your claim is sort of how we're gonna solve the problem. Here's, here's the evidence, but you're not giving it the, the thought processes that went in to creating this claim.

[14:24](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=864s) Why? When you, uh, uh, when you get a bunch of agents together collaborating and talking to each other, there's a tendency to have groupthink, and all the agents seem to kind of devolve into one idea.

[14:41](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=881s) I mean, it's, it's like, you know, you're in a group, you know, you're at a party, and everybody wants pizza except you. But then people talk you into-- You, you know, you don't wanna be, uh, you don't wanna spoil the party, so you go along.

[14:55](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=895s) And it seems that agents kind of work in the same way. So you're gonna return-- Y- basically, you're gonna give each agent only a slice. I didn't think about the pizza analogy, but yes, [laughs] every, every agent gets its own slice and, and it, uh, it should come through.

[15:12](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=912s) Okay. Fourth scenario, developer productivity. So the anti-pattern,

[15:25](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=925s) let every subtask dump its full output into the primary thread, crowding out the context. Again, this is what we're ju-- I was just talking about. This is bad. Let the context grow unbounded.

[15:37](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=937s) Bad, right? For the reasons we just talked about. You wanna isolate your subtask output, and you want to compact long sessions. I'm gonna take a second to talk about that.

[15:50](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=950s) So here's, here's a, uh, an example of a pattern. Uh, you want to have your agent, uh, look at the logs and create a summary of where the problems are in the log.

[16:06](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=966s) So here's your task, scan all the logs for error. context: fork. So you're forking the agent into a s-- like a separate thread where whatever the agent does, and thinks, and adds tokens to, does not come back and pollute the main, uh, the main context.

[16:28](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=988s) Now, you see here what happens, then you take this summation, and then you add that summation without all the other stuff into the overriding context. Now, this last little block is kind of interesting, I think, because you can check your token count, and you can determine how big the token count is.

[16:54](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1014s) And if you can set some limit, uh, you know, so if, if you have more than a hundred and fifty thousand tokens, then what you wanna do is you can run `/compact`.

[17:03](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1023s) So Anthropic and Claude have these compaction algorithms that take this giant context and, and compact it in some way, shape, or form. Not quite sure how the implementation is of that, but there is compaction.

[17:18](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1038s) Now, a little side effect, a little side channel. I've been walking around-- When you walk outside, you see, see these guys handing out these books, okay? A- anybody see these guys handing out these-- But take them.

[17:30](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1050s) This is, this is actually a pretty good little book. In fact, I was looking at it last night, and one of the things it had in it was-- This is by this guy, Sam, Sam Bhagwat.

[17:40](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1060s) I have no connection. I don't even know Sam. But it-- there's a-- on, like, page thirty-two, it says, uh, "His company provides custom logic for compression of context." So he's got an a-- And you can write your own.

[17:55](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1075s) He's got a, he's got-- You can extend his base class and have your own compression of your data, whatever you think is important. So I think that's kind of an interesting spin on this whole thing.

[18:07](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1087s) Okay. Claude Code for, uh, uh, continuous integration.

[18:16](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1096s) Uh, anti-pattern. Always have interactive modes in a pipeline. Well, no, no, no, 'cause interactive modes mean,

[18:24](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1104s) uh, uh, Claude will stop and ask you, "You wanna do this? You wanna do that? Can I have permission for that?" So there are ways to set it up so that it'll just run straight through, okay?

[18:35](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1115s) The other, uh, the other tip that I'll give you here

[18:41](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1121s) is there's something called the, uh, the batch. So you can take your prompts, you can take your work, and you can put them in a batch, and for fifty percent fewer token cost, you'll get the result they promise in at, at least twenty-four hours.

[19:00](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1140s) So if you're gonna go take a nap, you're gonna go on vacation, you're gonna go out, take a, a day off, run your stuff in batch mode, and you're gonna have, uh, uh, less to pay.

[19:13](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1153s) Where am I here? All right. I've only got a few, few minutes left, few seconds left, but I wanna conclude with this. Remember, nothing is a mistake. There's no win, there's no fail, there's no exam, only make.

[19:29](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1169s) You do it, and you make it, and you're gonna succeed. If you wanna reach out to me, reach out to me, uh, [REDACTED:email_address]. Look at my websites. I got a website, codesupremeai.

[19:40](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1180s) I'm a big jazz fan, and I named this website after John Coltrane, "Love Supreme," if you know that song. Great. Anyway, that's my story, and I'm sticking to it, and I'm about to zero time. [audience clapping]

[19:50](https://www.youtube.com/watch?v=Z-c11pV_uvU&t=1190s) Okay. Thank you. [outro music]
