I stopped prompting AI agents and gave them a manager

AIAI agentsClaude CodeOrchestrationCode review

Syahmi RafsanjaniCo-founder, CTO

An orchestrator agent handed out the work, answered every question, checked each PR for correctness, safety, performance and simplicity, and merged it. I kept one job only a person can do.

At 4:17pm on 6 November, an agent posted eight questions on issue #482 before writing a line of code. The task was sending purchase events to Meta when an order is paid.

Each question came with the agent’s own default. Question six was about rate limits. When an API says “too many requests” but not how long to wait, our Zernio client backed off for 1, 2, then 4 seconds. The agent proposed keeping that.

Less than two minutes later the answer was on the issue: “All eight defaults accepted, with one change.” The spec sets a 5-second default when the wait isn’t given, so the backoff became 5 seconds, with the spec line cited.

I didn’t write that answer. Another agent did.

That agent was the orchestrator. For nine days it was the closest thing Flair v2 had to an engineering manager, and one I didn’t have to hire. Which raises the question of what I was still for.

A manager with no memory

The orchestrator started as a Claude Code cloud session, and later ran on our VPS. Its rules are in one file, AGENTS.md. It holds no state of its own. Everything it needs to know is in GitHub: which issues are ready, which are blocked, which PRs are open, which questions wait.

That sounds like a limit. It turned out to be the point. Any fresh orchestrator session can take over by reading GitHub, so a new session loses nothing. It wakes on a worker’s message, a PR event or a scheduled check, does its rounds, and goes back to sleep.

Each round it does five things: answer questions, review PRs, merge what’s ready, unblock issues whose dependencies closed, and start new work.

Who builds what

The orchestrator hands out work by the risk label on each issue.

AGENTS.md · simplified
low risk    → a Sonnet worker session, or a Sonnet subagent for a small task
medium risk → a Sonnet worker cloud session
high risk   → an Opus worker cloud session
at most 6 worker sessions at once

High risk means schema and migrations, auth, money and payments, webhooks, and core business rules. That’s where the stronger model earns its cost.

Every worker starts the same way, with /task and the issue number. It reads the rules, the issue and only the decisions and spec lines the issue cites. Then it asks all its questions on the issue and stops until they’re answered. Only then does it read code.

The orchestrator answers in a fixed order. The mockup board wins for anything a screen shows. Then the spec. Then whatever is better for the person using the screen. Then whatever is easier to keep in the long run.

Every PR follows the same format. The issue lists its acceptance criteria, one line per behaviour, test or screen state. The PR repeats each criterion with its proof: a file and a test name, or, for anything on screen, a pair of screenshots.

For a new screen, “before” is the mockup board and “after” is a Playwright screenshot of the real screen in the same state, at the board’s width: 1440 pixels for desktop, 390 for phone. For a change to an existing screen, “before” comes from main and “after” from the branch. A criterion without proof isn’t met.

When a PR opens, the orchestrator starts a review in a subagent with its own worktree, so its own checkout never changes. The review runs while CI runs. When CI is green, the branch is clean and no blocking or should-fix finding is open, the PR is squash-merged.

One task, from issue to merge.

What went wrong, and where

I didn’t find anything the orchestrator got badly wrong. The workers were another story. Sonnet workers needed more fixes than Opus ones, but they got the simple tasks.

So from day four, to save tokens and keep work moving, the reviewer matched the worker. Sonnet’s work got a Sonnet reviewer; before that, every review ran on Opus. High-risk work, built by Opus, gets an Opus reviewer. For money, payments, auth, the schema and encryption, the review splits in two: correctness and security on Opus, performance and simplicity on Sonnet.

What the reviewer checks

Every review looks at the same four things, the same way I review code:

  • Correctness. Does it do what the spec and the issue’s criteria say, including behaviour nobody wrote a criterion for?
  • Security and safety. Who may call it, what input it accepts, webhook checks, rate limits.
  • Performance. No N+1 queries, no missing indexes, no unbounded lists, slow work moved into jobs.
  • Simplicity. No duplicated logic, no unusual abstractions, thin routes, existing patterns reused.

Each finding is graded. Blocking means wrong behaviour or a security hole, fixed and reviewed again. Should-fix covers a performance problem, duplicated logic or a needless abstraction, fixed before merge. A nit is fixed only if it’s cheap. That middle grade is what keeps the codebase small: duplication and clever layers never get the chance to land.

There is a cap, too. After three review rounds with blocking findings still open, the orchestrator stops, marks the issue for me, and tells me.

What I still decide

The orchestrator passes a question to me only when it changes scope, money rules, or something customers see that the spec doesn’t cover. How to retry linking a GoGet booking made outside Flair was one (#623). Numbered pages and a dark theme were my own requests, and they became decisions D-180 and D-182.

But the biggest thing I kept is harder to put in an issue. It’s how the app feels on a real phone and on the web. The orchestrator can check a screen against its mockup. It can’t tell me whether scrolling the inbox feels right in my hand.

That’s the answer to the question. The orchestrator decides what the documents can settle. I decide what only a person using the app can feel.

The lesson

Let the AI manage the work. Keep the feel of the product for yourself.

What I’d tell anyone letting an agent run the work

  • Keep the manager stateless. Put the state somewhere it can read, like GitHub, and any session can pick up the work.
  • Make workers ask before they code. A question answered in two minutes is cheaper than a PR sent back.
  • Match the reviewer to the worker. A weaker model’s work needs checking, and a strong model’s risky work needs a strong check.
  • Write down what reaches you. Scope, money and what customers see. Everything else the manager can settle.

All of this ran in sessions I could reach from anywhere, including my phone. But building from that phone, I hit a different limit: the tokens ran out.

Syahmi RafsanjaniCo-founder, CTO

Thinking of running AI agents with an orchestrator? Let's talk about yours.

Book a free callSystem review · build work · fractional CTO
Syahmi RafsanjaniCo-founder, CTO