Skip to content
← All posts

Engineering 23 min read

From "AI Writes Code" to "AI Delivers"

Coding agents write code; delivery still needs humans. My open-source Orca workflow: 75% fewer feedback rounds, half the serious defects, ~5× the tokens.

ByLoki Updated

On this page
From "AI Writes Code" to "AI Delivers". Two human gates; 75% fewer feedback rounds, 50% fewer serious defects, ~5x tokens.

I built a multi-agent development workflow. You give it one requirement; it writes a spec, makes a plan, implements, tests in a real environment, has Claude and Codex review the change independently, and hands back a PR that is ready to merge. A human steps in at exactly two points: is the plan right, and did the change stay in scope.

I ran a controlled experiment: the same requirement, building a mid-sized product from scratch, once with this workflow and once with a plain AI coding session. Results:

  • 75% fewer rounds of failure feedback: from the user (played by an AI in the experiment), 1 round vs. 4;

  • Half as many verified blocker- and critical-level defects in the code: 9 vs. 18;

  • The cost: about 5× the model output, and about 20% more wall-clock time.

The workflow is open source as a set of Orca skills: https://github.com/voxnexus-ai/orca-workflow


1. WRITING CODE IS NOT DELIVERING

Coding agents can now run for hours, even days, and produce code that works. But between "writing code" and "delivering" there is still a lot of ground:

  • Was the requirement understood correctly?

  • What does "done" mean?

  • What do the tests actually cover?

  • Is the reviewed version the one that gets merged?

  • If the run breaks halfway, where does it pick up?

  • Did the change stay in scope?

Chapter 1, after the list of six questions

When AI only writes code, a human fills that gap: giving instructions while also checking, relaying, and accepting the work. The faster the AI writes, the busier the human gets.

This year my job shifted from mostly management to mostly hands-on engineering, and I've been writing code with Claude Code and Codex almost every day. The bottleneck moved several times. At first it was token anxiety: I wanted to use up my quota every day. After I got Max plans for both Claude and Codex, quota stopped being the problem and I became the bottleneck. Three or four windows at once was my limit. The AI was waiting for me, not the other way around.

Better models alone won't close this gap.


2. WHAT I TRIED FIRST, AND HOW IT FAILED

Without a workflow

More windows. Three or four is the ceiling. Every agent stops every so often: to ask a question, to confirm a plan, to report "done" and wait for someone to look. The human has to keep checking in, relaying messages, and verifying results, and all three grow with the number of agents.

Let it run with /goal. Before stepping away, you give the agent a goal. The goal has to be complete up front, and then you're betting the agent understood it:

  • you can't see how it interpreted the goal;

  • there's no checkpoint along the way; when it's unsure, it guesses and keeps going;

  • "done" is judged by its own interpretation.

The drift only shows up at delivery, after hours of tokens are already spent.

Finding problems after delivery. There was more code than I could review. The worst part: nothing looked wrong at delivery, and a week later I'd find a feature was never implemented, or was implemented as something I didn't ask for.

The early workflow: slow and expensive

So I started building a workflow. The first versions went down a lot of wrong paths:

  • One requirement ran for about 96 hours:

    • repeatedly tuning model behavior on a real device;

    • the same risk tested at several layers;

    • a docs-only change forced a rerun of 1,006 tests;

    • the coordinator's model service was overloaded and the session stalled; nobody noticed for 39 hours.

  • A single QA session consumed about 680 million tokens: the agent kept tightening its own acceptance criteria.

  • 85 of the coordinator's 123 decisions were just filing progress reports.

  • 14 real requirements stalled about 25 times, and only three or four kinds of stalls were actually protecting quality. The rest came from rigid format rules, rules deadlocking each other, treating someone else's normal action as a violation, or a transient external outage. One small issue could stop the whole run for hours.

  • Small changes triggered full reruns: fixing a minor bug meant a full cycle plus another user confirmation. Specs and plans got bounced back several rounds over details.

Lesson: stricter is not better. Rigid rules, duplicate checks, and no sense of priority all make the AI spend time and tokens on things that don't matter. The workflow saw 200+ commits in six weeks, and most of them removed one kind of waste or another. Every principle below comes from one of these failures.


3. THE CURRENT DESIGN

The foundation: a platform for managing many agents

To turn those failures into a process that runs on its own, I first listed the capabilities I needed:

  • Agents from different vendors in one place. Different stages call for different models; Claude Code and Codex must work side by side and cover for each other when one runs out of quota.

  • Agents that talk to each other directly. No more copy-pasting between windows; a worker must be able to ask the coordinator a question and report its hand-in.

  • A record of every task. Who got what, and whether it's done, must live outside the chat so a broken run can be recovered.

  • An isolated workspace per requirement. Several requirements run at once and must not touch each other's code.

  • Scheduled, automatic kickoff. New requirements should be claimed and started without someone launching them.

I chose Orca, an open-source workbench for coding agents that already provides these:

  • Many agents: multiple terminals in one place, each running Claude Code, Codex, or another agent;

  • Dispatch and messaging: built-in task dispatch and agent-to-agent messaging, with a record of who has what and how far it got; workers can ask the coordinator questions directly;

  • Isolated worktrees: one worktree per requirement;

  • Scheduled automations: each run gets a fresh worktree.

So the workflow is implemented as Orca skills. Orca handles where agents run and how they talk; the workflow handles what process to follow and how each step is verified.

Outer loop: continuous iteration

This is how I run it every day:

Chapter 3, "Outer loop"
  • Bugs are fixed directly; a human only signs off before merge.

  • Features start with a proposal email; development begins only after a human replies to approve. After delivery, another email asks for merge approval.

  • After shipping, new requests and problems found by users or testers become issues and go back to the start.

A human files the issue; everything from claiming onward is automatic. Throughout the loop, the human only reads and replies to email, which works fine from a phone.

Inner loop: one requirement end to end

Chapter 3, "Inner loop"

Three roles. The human sets direction and makes the calls; the coordinator agent follows progress, judges exceptions, and talks to the human; and a runner, a long-running script, keeps the books, dispatches tasks, and verifies hand-offs. The actual work at each stage in the diagram is done by different worker agents.

Let each model do what it's good at. After a while you notice that models have different strengths, and that the same model shouldn't both write and review. So every role in the workflow can use its own model: the spec writer and spec reviewer come from different vendors, code is reviewed once by Claude and once by Codex, bug fixes and UI/interaction work go to Codex, other development goes to Claude, and small split-out tasks go to cheaper models. A side benefit: both subscriptions actually get used, and when one runs out of quota the other takes over, so the process doesn't stop.

Not every requirement deserves the full process. New features get the full process; typical requirements skip a few independent reviews; small items get one-page specs and plans; bugs get a ten-line issue note and fix plan and go straight to work. Day to day I mostly use standard mode.

Requirements change midway. Halfway through, the user adds "commas and semicolons should count too." That happens all the time. Early on, it meant starting a new run; now the workflow records the user's exact words, revises a copy of the spec, gets one confirmation, and carries on. Tiny changes take the user's words as approval.


4. FIVE PRINCIPLES I LEARNED

These five principles answer five questions in order: what the human does, how to trust the output, how to balance quality and cost, how the process keeps running when nobody is watching, and how one person can direct many more agents.

1. Humans gate only before work starts and before merge

Problem: If a human has to look at everything, the human is the bottleneck. But if you look at nothing and just hand over a /goal, the agent's interpretation is invisible: it guesses when unsure, and drift only shows up at delivery.

Approach: The human shows up at two moments, chosen because that's where a look is most valuable and cheapest:

  • Before work starts, review the plan. The agent reads the code, investigates, writes its understanding as a spec with acceptance criteria, has another agent review it independently, and condenses it into a one-page summary. The human decides whether the requirement was understood and the approach is right. If the plan is wrong, nothing downstream can save it. Catching drift here costs minutes; catching it after delivery costs hours.

  • Before merge, review the scope. The human reads the PR and delivery report and checks whether the change drifted or touched more than expected. An oversized blast radius is usually where the risk is.

In between, the human is only asked about genuine ambiguities. The spec-writing agent investigates first; when a human decision is really needed, the worker stops and waits until it gets an answer. Early on I let workers "go with their own recommendation after ten minutes with no reply." Then a user's emailed answer arrived hours later, had nowhere to go, and the run went in circles.

All of these requests can be answered by email. Approval emails are assembled by the program from the already-reviewed spec and delivery report. The AI interprets what the reply means; the program only checks facts: is this the right thread, is the sender right, which version is being approved.

Evidence: In the experiment, across three stages, the Workflow arm's user (played by an AI) stepped in only 5 times: one round of kickoff clarification, three merge approvals, and one round of failure feedback. The user had pre-authorized both arms to start without stopping for a plan review, so those 5 don't include plan reviews; the pre-work gate was the independent review, which sent the spec and plan back 8 times before any code was written. Failure feedback after delivery: 1 round for the Workflow arm, 4 for the plain AI arm.

Limit: The workflow can't make a vague goal clear on its own; it surfaces drift earlier. If a human approves the spec without reading it, drift still happens.

2. Trust comes from an evidence chain, not from reading the code

Problem: There's more code than anyone can review, and "done" is the AI's own claim. That's how you end up finding, a week later, that a feature was never implemented.

Approach: Break trust into a chain where every link leaves something you can check:

  1. Acceptance criteria before code. "Done" now has a definition written and reviewed in advance. This targets "it's not what I asked for."

  2. Test each acceptance criterion. Record the scenario, key assertions, actual result, and the exact version tested. Anything unverified is marked as such; real end-to-end requirements can't be satisfied with mocks. This targets "the feature was never implemented."

  3. Two models review independently. Claude and Codex each review the same change in separate sessions, and the findings are merged.

  4. What was reviewed, tested, and merged is the same code. Every artifact is fingerprinted. The merge uses --match-head-commit to pin the approved commit; if anyone pushes after the check, GitHub refuses the merge.

At merge time, the human doesn't read thousands of lines. They check three things: are all acceptance criteria met, what remains unverified, and is the change within the expected scope.

Why two models? In the experiment, the Workflow arm ran 8 rounds of dual-model code review internally and found 59 issues:

Principle 2, "Why two models?"

56% of the issues were found by only one of the two. One example: in an existing SDK, the developer added a callback to fix a previous finding. In the second review round, Claude pointed out a possible three-way deadlock:

  • the install task held a read lock while waiting on a worker thread;

  • the shutdown path was waiting for the write lock;

  • the worker thread needed a read lock to run the callback;

  • and the queued writer blocked new readers.

Codex had missed it. After reading Claude's finding, it re-traced the lock lifetimes and explicitly acknowledged the miss. The developer withdrew the callback and used an existing query path instead, removing the structural cause. The deadlock came from source analysis and was not reproduced at runtime.

This isn't just one anecdote; research points the same way:

  • Model errors are correlated. A study of more than 350 models found that on one dataset, when two models were both wrong, they gave the same wrong answer 60% of the time, and models from the same provider or architecture err more alike (Kim et al., ICML 2025). Reviewers from different providers overlap less in their blind spots.

  • Models favor their own output. As evaluators, models rate their own generations higher (Panickssery et al., NeurIPS 2024). Writing and reviewing with the same model makes the review lenient.

  • Without external feedback, models struggle to correct themselves (Huang et al., ICLR 2024). You need an independent reviewer and real tests.

But two reviewers are not independent insurance. The same study found that stronger models have highly correlated errors even across providers. And software engineering learned in 1986 that programs written independently from the same spec fail together far more often than independence would predict (Knight & Leveson). So dual-model review is one link in the chain; the acceptance criteria before it and the tests and human approval after it are all still needed.

(Claude alone found 23 issues and Codex alone found 10. This experiment can't tell why, so I'm not ranking the two.)

3. Check early, and make checks converge

Problem: More checks mean better quality, and higher cost. Early on, specs and plans were bounced for details round after round, and a docs-only change reran a thousand tests, burning tokens for nothing.

Approach: Put checks early, and give every check an end:

  • Send back only what matters: only critical, high, and medium issues trigger a revision.

  • Cap the rounds: at most 5 for spec and docs review, 3 for plan review; at the cap, fix only high-severity issues and move on.

  • Each check has its own job: plan review only looks for problems later stages can't catch. Things like "how will the tests be run" surface naturally while coding.

  • Don't repeat work: test first, then review. If the code hasn't changed, reuse the last review; docs-only changes don't rerun tests; re-reviews only look at what changed.

  • Fix loops end too: if the same issue is still broken after 3 rounds, the developer doesn't just try a fourth time. The coordinator sorts it into one of four cases:

    • an artificial test case that rarely happens in practice: let it go and record why in the delivery report;

    • the key problem is solved and one more round should finish it: one more round;

    • the key problem is solved and it's polishing edge cases: ask the user whether to keep going; if not, record a known issue;

    • the key problem is still unsolved: call in the technical expert. It works in a temporary copy of the code, finds the root cause, looks up known fixes, tries changes and runs tests, then returns a proposal and a patch without touching the in-progress code.

  • Pick the mode by size: not every requirement gets the full process (see section 3).

Being upfront about cost. To see the strictest setting, the experiment used Full mode. During development the Workflow arm produced about 3.47M output tokens; the plain AI arm about 0.65M. Broken down:

Principle 3, "Being upfront about cost"

In the chart, quality assurance covers spec and acceptance criteria, plan, real-environment testing, dual-model code review, test fixes, and the independent reviews; coordination & delivery covers the coordinator, research, PR creation, and the delivery report; helper sub-agents are the subtasks split out during implementation and fixes.

  • Writing the code cost about the same on both sides: 0.65M vs. 0.79M. The plain AI arm's 0.65M already includes its own self-testing and fixes; the Workflow arm used 0.79M for implementation alone, but produced twice the code and 3.5× the tests.

  • The extra tokens mostly bought quality: before coding, requirements became reviewed acceptance criteria; after coding, each criterion was tested and two models reviewed the change. In return: rework went from 4 rounds to 1, and serious defects from 18 to 9.

  • Docs took 5% and bought long-term maintainability: the Workflow arm left a spec, plan, design notes, and change log for every stage. Whoever picks it up next, human or agent, can see why things were designed this way and what changed.

There's room to cut cost further, for example by moving main stages such as implementation and testing to more cost-effective models. So far that has only been piloted on helper subtasks during implementation and fixes; the main stages haven't been switched yet.

4. Make the process run unattended

Problem: If the human is going to walk away, the process has to hold up on its own. I hit two opposite failures:

  • Too many rigid rules: the process kept stopping to wait for a human. 14 real requirements stalled about 25 times, and only three or four kinds of stalls were protecting quality. The rest were format mismatches, rules deadlocking each other, a normal action flagged as a violation, or a transient external outage. Each stall lasted hours and pulled the human back.

  • Acting on unknown outcomes: once, the runner waited 30 seconds and decided a worker had failed to start. The request actually succeeded 33–37 seconds in, so the same task was dispatched twice and two workers edited the same code.

Approach:

  • Rules guard only the baseline; everything else is left to the AI. The program strictly enforces only facts that are exactly computable and costly to get wrong: is the hand-in from the original agent, is the approval for the current version, is the merged code the reviewed code. On those, the AI's word doesn't count; the program checks. Everything else goes to the AI: a hand-in in a slightly different format, tests run differently, a situation it hasn't seen before. It reads and decides. External outages are retried automatically. When the process must stop, it can only "redo this step" or "go back to an earlier stage"; a requirement never gets stuck with no way forward but starting over.

  • State lives in files, not in the conversation. Each requirement has its own state directory: current stage, artifact fingerprints, review records, every clarification and approval in the user's own words, every dispatch receipt. All writes go to a temp file and are then renamed. A session can drop at any time; another model or another coordinator can pick up and read where things stand, on what basis, and what's still owed.

  • When an outcome is unknown, check before acting. Every dispatch keeps a stable request ID. An unclear result is recorded as "unknown," then resolved by querying the original receipt and verifying the task and the worker's identity, never by launching another worker. The same applies to outward actions like sending email or merging: an unknown result is never retried automatically.

Why it matters: Too many rules and the process keeps interrupting the human; too few and the human doesn't dare let go. Only with a hard baseline and flexibility everywhere else can the human safely look at just two emails. This principle underpins principle 2 (key facts are checked by the program, not taken on the AI's word) and the next one (the process doesn't keep stopping and pulling the human back).

5. Manage requirements, not agents

Problem: Management talks about "span of control": a manager can directly lead maybe seven or eight people. With agents it's worse: three or four, because human attention goes to three things:

  • Switching over to check: has it stopped? Is it stuck? Is it waiting for me? That's being the monitoring system.

  • Copying A's conclusion to B, relaying the requester's answer to the implementing agent: that's being the message bus.

  • Confirming that every "done" really is done and done right: that's being QA.

All three grow linearly with the number of agents, so more windows can't break the ceiling. Principle 2 already handed off the QA job. For the other two, I used the old ways teams scale:

Principle 5, after "the old ways teams scale"
  • Layering: each requirement gets a coordinator agent with its own set of workers; the human only deals with requirements.

  • Management by exception: problems come to the human instead of the human going to look. Only two things trigger a notification: a decision is needed, or the process is genuinely stuck. No routine progress pings; a broken hand-off triggers one reminder, not a nag every few minutes.

  • Written hand-offs: agents collaborate directly. A worker writes a hand-off file and reports completion from its original terminal; questions go through Orca's native ask channel and answers are written back to the original question. Before parallel work, each package's dependencies, owned files, and integrator are written down.

  • Standard roles: each role owns fixed stages and uses a model suited to it (see section 3).

  • Closed-loop delivery: the outer loop from section 3. Orca scans GitHub issues on a schedule and claims and starts work automatically; the human just replies to email.

Result: How often a human has to step in depends on the number of requirements, not the number of agents. In the experiment, one requirement was carried by dozens of agents in relay: 27 agent terminals and 86 dispatched tasks over three stages, while the user stepped in only 5 times. I used to manage three or four agents at most; lately I've had a dozen or so requirements running in parallel, plus bug fixes.

Once human attention stops being the bottleneck, the bottleneck moves. For me, it was several Android builds running locally at once, which my dev machine couldn't handle, so I upgraded it. A bottleneck that moves from the human to the machine is a good sign.

Others have seen the same:

  • Cursor: when peer agents claimed tasks through shared files and locks, 20 agents briefly had the effective throughput of two or three; they moved to separating planners from workers.

  • Stripe's Minions: combine free-running agent steps with deterministic checks in isolated environments.

  • OpenAI Symphony: wires task boards, dependencies, and isolated workspaces into a continuous scheduling system.

More agents only add execution capacity; real throughput comes from clear ownership and controlled hand-offs.


5. EVALUATION: A FROM-SCRATCH CONTROLLED EXPERIMENT

After using the workflow for a while, it felt clearly better than "just let the AI write code": less rework, fewer problems. But feelings aren't data, so I ran a controlled experiment.

Setup:

  • Project: the same requirement, building a mid-sized product from scratch: a multi-developer agent collaboration platform, delivered in three stages (accounts and onboarding, cross-person collaboration, human-approved merge).

  • Two arms, with the same requirement and materials:

    • Workflow arm: Full mode in all three stages, verified against the run records;

    • Plain AI arm: a regular Claude Code session that could plan, self-test, and self-check, but with no workflow and no independent dual-model review;

    • Primary model: the same for both, Claude Opus 5.5.

    • Kickoff: the user pre-authorized both arms to start without waiting for a plan review; merges still required user approval.

  • User: played by an AI, answering from frozen business facts. After each stage, it tried the real product against a public checklist and sent all findings back in one batch.

  • Final evaluation:

    • Hidden tests: an independent AI evaluator ran 20 pre-frozen cases in an isolated environment;

    • Blind code review: Claude and Codex each reviewed both codebases 5 times without knowing which arm produced which; serious findings were then verified line by line.

Results (Workflow vs. plain AI):

  • Public acceptance, three stages: both passed all; the workflow passed 2 stages on first delivery, plain AI passed 1.

  • User failure feedback: 1 round vs. 4 rounds.

  • User product trials: 4 vs. 7.

  • Hidden tests (20 cases): 18 passed and 0 failed for both; the same 2 cases could not run due to environment limits.

  • Verified blocker- and critical-level issues (blind review): 9 vs. 18.

  • Verified issues per thousand lines: ~1.0 vs. ~3.2.

  • Agent tasks dispatched: 86 vs. a single development session.

  • Wall-clock time: ~18 hours vs. ~15 hours.

  • Model output during development: ~3.47M tokens vs. ~0.65M tokens.

How to read this:

  • 75% fewer rounds of failure feedback. Both arms ended with a product that passed strict final evaluation; the difference is how many round trips it took to get there. The user here was an AI; with a real person, every extra round means trying the product again, writing up feedback, waiting for a fix, and verifying again, and only a person can spend that time.

  • Half as many latent serious defects. Neither arm failed a hidden test, but reading the code tells a different story: the plain AI arm had twice as many verified blocker- and critical-level issues. Most only trigger under specific conditions, for example:

    • a test command specified by the delivering side runs directly on the requester's machine, which amounts to cross-user arbitrary command execution;

    • when one execution environment is connected to several projects, data leaks into other projects;

    • failures recorded as successes.

    Exactly the kind of thing functional tests miss and only code review catches, the "found a week later" kind.

  • The price is time and tokens. First delivery of stage one took 3.7 hours with the workflow vs. 27 minutes without; overall ~18 hours vs. ~15; about 5× the model output. See principle 3 for where that 5× went.

The workflow spends more AI time and tokens to buy less rework and fewer latent serious defects. When a human's time costs more than the AI's, that's a good trade.

Limitations:

  • Sample size: one project, one implementation per approach (N=1). This is a case study of what I saw on this kind of project, not a general ratio.

  • The user was an AI: feedback rounds and trial counts come from an AI-played user and were not converted into real human hours.

  • The blind review may favor the workflow: it used Claude and Codex, the same kind of tools as the workflow's built-in dual-model review, and the Workflow arm's code had already been reviewed by them during development. Even so, every counted issue was verified line by line and does exist in the code.


6. WHAT'S NEXT

What's solved so far is collaboration between one person and their own agents. Two directions next:

  1. Agents of different people collaborating. Several developers' agents negotiate dependencies, deliver results, and ask each other questions directly, without a human relaying messages; the right owner still signs off on each merge. Fittingly, the product both arms built in this experiment is exactly that: a multi-developer agent collaboration platform.

  2. Lowering cost further. Bring in more cost-effective models. So far that's only piloted on helper subtasks during implementation and fixes; next is trying main stages such as implementation and testing one at a time, to find the cheapest combination that doesn't lose quality.


7. OPEN SOURCE AND HOW TO TRY IT

The workflow is open source as Orca skills: https://github.com/voxnexus-ai/orca-workflow

Two skills:

  • orca-feature-workflow: the workflow itself, including coordinator instructions, the runner and module scripts, stage configuration workflow.yaml, per-stage deliverable templates, and the full test suite.

  • cross-model-review: Claude and Codex cross-review.

You'll need:

  • Orca

  • Bun 1.4+ (no npm dependencies)

  • Claude Code or Codex CLI, at least one; log in to both for full dual-model review

  • gh CLI

  • Gmail connector (optional, for approval and alert emails)

Three steps:

git clone https://github.com/voxnexus-ai/orca-workflow.git
cd orca-workflow && ./install.sh   # installs both skills for Claude and Codex

Then open your project in Orca and, in a Claude or Codex session, state a requirement, for example:

Add "remember me" to the login page, valid for 7 days.

The coordinator asks you to pick a mode, creates a worktree and task record, starts the runner, and drives the work to a PR. You only reply when it asks a question or needs an approval, at your desk or from your phone.

Note: the human approval step protects against AI mistakes, not malicious actors, and isolated worktrees are not a security sandbox.


CLOSING: FROM WRITING CODE TO DELIVERING

When AI writes code, the human is its operator: giving instructions, watching progress, relaying, verifying. When AI delivers, the human is its owner: setting direction and judging results.

The difference between the two is what a good engineering team already does:

  • define what "done" means;

  • give every piece of work an owner;

  • make sure the tested, reviewed, and delivered versions match;

  • when an outcome is unclear, find out before acting.

This workflow turns those checks and hand-offs into a process the AI can drive and a human can verify at any time.

Try it, file issues, and if you have your own team's data, I'd love to see it.