Dev diary - 3. December 2026

AI agent orchestration: Why your agents need a boss

header_image

If you use AI coding agents seriously, you've probably gone through the same stages most of our engineers have. As the number of parallel sessions grows, AI agent orchestration becomes increasingly important.

If you use AI coding agents seriously, you've probably gone through the same stages most of our engineers have.

First, it's one ticket and one session. You paste in the Jira ticket (or let the agent pull it through MCP), plan with it, implement together, and finish. Then you notice the agent runs for 15 minutes at a time while you watch. So you open a second terminal with a second ticket, then a third, then a fourth.

That's when it breaks down. Not because the agents can't keep up, but because you can't.

The hidden job: being the message bus

Parallel sessions rarely stay independent. Ticket 1 turns up something that affects ticket 2. One agent reports a finding, and you squint at that chat, switch to the other window, and type: "Hey, listen, I just found out that…"

Without noticing, you've become the orchestrator. You keep track of every session, context, repo, worktree, branch, and ticket, and every conflict between them goes through your head. For fully independent tasks, that's fine. For a real epic, like the complex infrastructure migration one of our engineers, Marko Palušek, has been running, it doesn't scale. In his words, he was "pulling his hair out" building a communication layer between his own agents by hand.

The fix turned out to be one extra layer of AI agent orchestration: an agent whose only job is to know everything and implement nothing.

The orchestrator pattern

Think of how a project normally runs. A product owner or tech lead designs an epic, breaks it into ten subtasks, and hands them to ten people. Each person implements their piece, usually with an AI session that only sees that one ticket and has no idea about the bigger picture.

We've already seen the benefits of structured AI workflows in our AI-assisted frontend migration project, where specialized AI roles, context engineering, and human approval gates helped us achieve a 60%+ gain in developer efficiency.

The orchestrator pattern brings that big picture back by introducing a structured approach to AI agent orchestration:

  1. The orchestrator is a long-running Claude Code session that holds the whole plan. It designs the work, breaks it into tasks, delegates them, tracks dependencies, and settles conflicts. It doesn't write code. It's the boss.
  2. Workers are full Claude Code sessions, each owning one task. Each one also knows it's part of something bigger.
  3. You talk to both, but you're no longer the one passing messages between them.

The roles are just two Markdown files, orchestrator.md and worker.md. Interestingly, the AI wrote them itself. Marko simply described what he wanted ("a boss that delegates and resolves conflicts, workers that implement, and they communicate"), and the rest followed. One thing you do have to spell out: AI is eager to help, so if you don't define the role firmly, the orchestrator keeps trying to do the work itself.

We've also experimented with this separation of responsibilities in our AI Prototype Factory, where an orchestrator coordinates specialized AI agents to turn specifications and mockups into working prototypes.

What about Claude Code's built-in Agent Teams?

Claude Code ships with Agent Teams: a lead agent, teammates, a shared task list, and a communication channel. It's worth trying, and we use it for fan-out work. For example, a lead plans a feature that touches four apps, and four teammates implement it in parallel, or one teammate implements while another reviews and a third tests.

For long-running orchestration, though, it didn't fit. The whole team lives inside one session, the team structure isn't persisted to files, and teammates aren't full sessions you can step into and work with. The custom pattern below solves all three.

Our experience with AI agent orchestration also extends to AiderDesk, an open-source platform we developed to support multi-agent workflows, isolated Git worktrees, and delegation to specialized subagents.

How it works in practice

1. Memory lives in Markdown, in Git

The orchestrator's memory isn't a database or a vector store. It's a couple of Markdown files: the plan, the task list, what's done, and what's in flight. This matters more than anything else in the setup.

Marko's orchestrator has now been running for 22 days. When the context window fills up, it gets compacted, and that's fine because the truth isn't in the context; it's in the files. If lightning hit the laptop tomorrow, a fresh session could read the files and pick up where the old one stopped.

Practical tip: don't wait for auto-compaction at ~98%. At around 85%, ask the orchestrator to think carefully about what matters and write you custom summarization instructions, then run /compact with them. A few minutes later, you're back to ~20% context with nothing important lost. A status line showing context usage and your 5-hour usage window makes this easy to track.

This is a best practice for any agent work, not just AI agent orchestration: anything that only lives in an agent's context will eventually be lost. Spec-driven frameworks like OpenSpec help a lot here.

2. Delegation through handoff files

A custom /delegate command turns a task into a worker:

  1. The orchestrator writes a handoff file, a Markdown brief for the worker containing the task, context, constraints, and the linked Jira ticket number.
  2. It spawns a new, fully featured Claude Code session in the background.
  3. The two do a handshake: "I created you. Your role is worker; your task is this. Read the handoff." The worker confirms and starts planning.

A naming prefix (e.g., everything spawned by the migration orchestrator starts with HQ-MIG-…) keeps the agent list readable. Claude Code's session sidebar then works as a dashboard over your agent team: who's working, who's idle, and who's waiting for your input.

3. Worktrees are non-negotiable

Every worker implements in its own Git worktree. Without that, parallel agents run into each other's changes. With it, each one can commit and push freely without affecting anyone else. In our setup, each task maps to one OpenSpec change in the relevant repository, and the work spans at least three repos.

4. A clear worker lifecycle

Each worker goes through the same steps, with the human involved at the decision points:

OpenSpec change → plan review (human) → implement → code review → test → archive → outcome file

The outcome file is the important last step. You get asked to do A, you do A, but along the way, you find three other things and end up doing A differently than planned. The outcome file records all of that, and it goes back to the orchestrator, which updates the plan and tells any other workers it affects.

5. Discoveries spread on their own

Because every worker knows the big picture, workers often notice for themselves that a finding affects another task and either flag it or message the orchestrator directly. Nobody had to tell them to: it follows from the role definitions. Even when a worker misses it, the orchestrator catches it when the outcome comes in. The synchronization you used to do in your head now happens inside the system.

6. Asking what to do next

Since the orchestrator knows all the dependencies, a simple suggest next work command becomes surprisingly useful. Instead of working out what's unblocked and most valuable, you ask the agent that already knows.

7. Jira as a by-product, not a chore

Teammates and the product owner kept asking: "Where are we?" The honest answer, from someone buried in the work, was "I don't know."

So the orchestrator got a Jira Sync skill. Once a day, it spawns a subagent that compares the files and the active workers against the epic in Jira and updates tickets to match reality. The tickets are deliberately kept at roughly equal story points, so the epic's progress bar actually reflects progress. The next obvious step is automatic time logging when a worker finishes.

None of this would have been possible without one agent that knows everything.

Scaling up: orchestrators of orchestrators

Our colleague Natália works on two topics in parallel. She runs a separate orchestrator for each, plus an uber-orchestrator above them that follows both, updates Jira, and will eventually log time.

The principle of AI agent orchestration is the same at every level: there should always be one agent at the top. Once you have several, they'll start to depend on each other, and if nothing sits above them, you're back to being the message bus.

Follow that idea to its end, and you get a personal "digital twin": an agent that knows every ticket, review, and request you have in a day, does none of them itself, and can tell you at 5 pm that you planned five things and finished three.

The honest trade-offs

Tokens. On a €100 Claude plan, this setup is comfortable for DevOps and infrastructure work, where agents spend much of their time waiting on VMs. Classic coding loops (generate, run tests, repeat) burn tokens much faster. Run 8 workers at once, and you'll hit limits quickly.

Human bandwidth. The real ceiling isn't tokens; it's you. If 8 workers come back within 10 minutes, each with an analysis and a decision for you, you can't keep up. The orchestrator removes the coordination load, not the decisions.

Code review. In standard product development, each worker's output ends as a pull request, and humans review it the usual way. The orchestrator changes how the work is coordinated, not who's accountable for what ships.

Losing the overview. Yes, you lose some detail of what's going on, and that's part of the deal. The answer to "Where are we?" is increasingly "Let me ask my orchestrator," and the next step is that the PO asks it directly.

Building it is real work. Marko's setup is on roughly its fifth iteration. On this project, about half his time went into building the system rather than the migration itself. It needs constant improvement, and that is the new job.

Getting started

If you want to try AI agent orchestration on your project, here's how to get started:

  1. Define two roles in Markdown, orchestrator and worker. Let the AI draft them from a short description, then make the "orchestrator never implements" rule firm.
  2. Store all state in files, in Git: the plan, tasks, handoffs, and outcomes. Treat context as temporary.
  3. Create a /delegate command that writes a handoff file and spawns a full worker session.
  4. Require worktrees for every worker.
  5. Close each task with an outcome file that goes back to the orchestrator.
  6. Compact early and with intent, at ~85%, using custom instructions.
  7. Add the conveniences when you need them: suggest next work, Jira sync, time logging.
  8. Start with 2–3 workers. More agents than you can respond to is just a longer queue.

The change in setup is small: one more layer above your sessions. The change in how you work is much bigger.

Frequently asked questions

AI agent orchestration means coordinating several AI coding agents so they work toward one goal without you passing information between them by hand. In our setup, one orchestrator agent holds the whole plan. It delegates tasks to worker agents, tracks dependencies and resolves conflicts.
Parallel sessions rarely stay independent. A finding in one ticket often affects another, and without an orchestrator you become the message bus: you relay context between windows and keep every conflict in your head. That works for unrelated tasks, but it doesn't scale to a real epic.
The orchestrator designs the work, breaks it into tasks, delegates them, tracks dependencies and settles conflicts. It never writes code. You have to define that rule firmly, because otherwise the AI tries to do the work itself.
Agent Teams is great for short fan-out work, like several teammates implementing one feature in parallel. For long-running orchestration it fell short in three ways: the whole team lives inside one session, the team structure isn't saved to files, and teammates aren't full sessions you can step into. The custom pattern solves all three.
In plain Markdown files stored in Git: the plan, the task list, what's done and what's in flight. Context gets compacted and eventually lost, but the files stay. A fresh session can read them and pick up exactly where the previous one stopped.
Tokens and human attention. Running around eight workers at once hits plan limits quickly, especially in code-and-test loops. The bigger limit is you: the orchestrator removes the coordination load, not the decisions. That's why we recommend starting with two or three workers.
blog author
Author
Diana Krajčíriková

Product Owner with more than five years of experience across different software projects, including a long-term focus on WTR Global. She primarily works with startups, helping identify client needs, define product value, and connect product decisions to business goals. She also works on AI initiatives alongside her core product work.

Read more

Contact us

Let's talk