Orchestrating Coding Agents
Published by O'Reilly Media, Inc.
Patterns for running more than one agent without losing control
What you’ll learn and how you can apply it
- Diagnose which limit you’re actually hitting (context, serial execution, model cost, or a single point of failure) and pick the pattern that addresses it
- Build a handoff loop with a scratchpad file, so work survives across fresh context windows without silent summarization
- Run a generator-critic review with a defined pass condition and a hard pass limit, and filter the findings before acting
- Set up parallel agents on one repo with Git worktrees, so each one ends up as its own reviewable pull request
Course description
Orchestrating agents involves the practice of running more than one coding agent on the same work and deciding which agent does what, in what order, and how the results come back together. Engineers reach for it when a single agent stops being enough, and the signs are consistent: the context window fills up and the agent drifts from its own plan, independent tasks run one at a time, one expensive model handles both the architecture decisions and the mechanical renames, and an assumption made wrongly early on has nothing in the system to catch it. Orchestrating multiple agents addresses those limits and introduces new ones, including merge conflicts between agents editing the same files, errors that compound across handoffs, and token costs that grow faster than the agent count.
This course with Alfonso Graziano covers the main orchestration patterns in order of complexity: a scratchpad file that carries state into a fresh context window; a second agent that reviews the first one’s work under defined stop rules; several agents running in parallel on one repository with context, worktree, or machine isolation; subagents in their four common arrangements; and orchestration written as a script so a repeated flow runs the same way every time. Each pattern is demonstrated live on a real repository. By the end of the course, you’ll be able to diagnose which limit you’re hitting, choose the lightest pattern that addresses it, and set up parallel agents so each stream of work ends as its own reviewable pull request.
The course is discussion-based, with live demos run by Alfonso, so no setup is necessary. The scripts and prompts used in the demos are available as downloads during the session, so you can run them afterwards on your own repo.
This live event is for you because...
- You’re a software engineer or tech lead who uses a coding agent daily and keeps hitting its ceiling on bigger jobs.
- You’ve tried running two or three agents at once and they overwrote each other’s work.
- You’re paying for a frontier model to do work a cheap one could handle, and you want to split that up.
- You want to hand off several stories in the evening and review the results in the morning, and you want to know what breaks when you do.
Prerequisites
- Professional software engineering experience, any language or stack
- Regular use of a coding agent on real work (Claude Code, Codex, Cursor, Copilot, or similar)
- Comfort with Git branches
- No machine learning or AI engineering background needed
Recommended follow-up:
- Read AI-Native Software Engineering (book)
- Read AI Engineering (book)
- Read Building AI Agent Platforms (book)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
When one agent stops being enough (15 minutes)
- Presentation: The four signals and the four costs
- Q&A
One agent, bigger jobs (20 minutes)
- Presentation: Compaction against scratchpads; what compaction does, and why a summary of a summary gets worse every time it runs; the handoff loop—write the state to a file, read it, fix what’s wrong, start a fresh window; the prompt that produces a usable handoff file, section by section; the spec as a coordination artifact
- Live demo: The handoff loop
Two agents, one loop (30 minutes)
- Presentation: Generator and critic; why a model is the worst reviewer of its own work; filtering (the step people skip, and the consequences); three rules that keep the loop healthy; two loops that run themselves; the two guardrails you never leave out
- Live demo: Adversarial review on a real diff
- Q&A
- Break
Running agents in parallel on one codebase (20 minutes)
- Presentation: Three levels of isolation; when agents share a repo; the rule that makes separate context windows safe; Git worktrees; two commands to learn; when the limit stops being your laptop and starts being how much output you can review
- Live demo: Three agents, three worktrees, three branches
- Group discussion: What stops you from running three agents right now?
- Q&A
Subagents and orchestration as code (25 minutes)
- Presentation: Subagents; four shapes—orchestrator-worker, sequential pipeline, fan-out and fan-in, and the router; how to tell orchestrator-worker from fan-out; a cheap model that runs the job and pays for the strong one only on the hard slice, what they cost and why a thin summary from a worker can mislead the lead agent; writing the orchestration down; headless agents driven by a script, with the in-between results held in variables instead of a context window; a deep-research workflow read line by line; fixed script against letting the agent decide, and how to tell which one a task deserves
- Group discussion: Which task do you repeat often enough that it should be a script?
- Q&A
Wrap-up (10 minutes)
- Presentation: The pattern-to-problem table on one slide; the dark factory, what it already does well, and the two conditions it needs; the limit nobody mentions
- Q&A
Your Instructor
Alfonso Graziano
Alfonso Graziano is an AI lead at Nearform, where he builds production AI agents and helps engineering teams adopt AI-native ways of working. He writes and speaks about context engineering, spec-driven development, and shipping reliable software with AI agents, and has given over 20 talks at conferences across Europe. Alfonso is the author of AI-Native Software Engineering (O’Reilly). He’s based in Italy and is passionate about continuous learning, critical thinking, and problem-solving.
Skills covered
- Claude
- QA / Testing