You launch eight or ten Claude Code and Codex sessions on different features at once. For the first fifteen minutes, you feel like an orchestra conductor. Then reality hits. The first tab asks you to confirm a config edit, the third hits a failing test, the fifth quietly rewrites half a module, and an urgent message from a teammate lands in your chat. To give the agent in tab seven a sensible answer, you have to reload the branch context in your head, open diffs, and dig through files. By evening, your head is spinning from context switching. You're no longer managing the agents; they're chasing you around the terminal.
The usual advice to "work on one task at a time" doesn't stick here. Once you see that AI can build several features in parallel, going back to manual sequential coding feels painful. The real question is how to organize multi-agent development so you don't become a dispatcher for ten chat windows or let code quality slip.
A great proving ground for this setup is the multiplayer browser arena Bug Swarm (Teams Tabs vs. Spaces), deployed on Railway. The game was built from scratch without a single line of hand-written code by the open-source AI Software Factory, developed by Cole Medin and Rasmus on top of the Archon engine. To stress-test the pipeline, they dictated a whole batch of new features by voice in one go: grenades with friendly fire, control hints at the bottom of the screen, faster teammate revives with a larger radius, black holes with random teleportation, auto-team balancing on join, and an invisibility cloak that lasts 10–15 seconds and blinks before wearing off. Below, we'll look at how this pipeline works under the hood and where its real limits lie.
Why ten agent tabs burn out your attention and why you need one orchestrator
When a developer jumps between ten sessions manually, their own working memory becomes the bottleneck. Every single time, you have to recall the architecture of a specific branch, check that the agent hasn't invented extra work, and manually push the task to the next step. The load grows linearly with the number of open tabs, while human attention doesn't scale.
The ai-software-factory architecture solves this by splitting work into two clear layers. Not three nested orchestrators stacked on top of each other, just two levels: one top-level orchestrator and one deterministic execution engine.
At the top sits the orchestrator, the only agent a human ever talks to. Claude Code, Codex, Hermes, GrokBot, or a personal "second brain" wired to voice input like Aqua Voice all fit this role. You dump a raw stream of thoughts into it in plain language (like those feature ideas for Bug Swarm) and never touch the worker terminals again. The orchestrator slices your stream into clean tickets, sends them to the factory, attaches lightweight status monitors, and brings you only the forks where a human decision is truly needed.
The orchestrator's main trick is that it intentionally abstracts away implementation details. It doesn't read every line of generated code or wade through giant diffs, which keeps its own context window clean. Its job is to stay focused on product intent and queue state.
It can be tempting to go one step further and put an "orchestrator of orchestrators" on top to manage five factories at once. Cole Medin deliberately avoids this: the more layers you add between the human and the actual output, the faster the feedback loop breaks. You end up with an infinite recursion of tokens and compounded mistakes.
Ticket-centric state: how Archon solves crashes and bloated context
Underneath the orchestrator runs Archon, an open-source harness builder for AI coding under the MIT license that reached 24,022 GitHub stars by late November 2026. If you want a familiar comparison, think of it like GitHub Actions or a Dockerfile, but built specifically for agent workflows. Inside, it pairs Bun and TypeScript with a local database (SQLite or PostgreSQL), YAML step graphs, a web UI, notifications for Slack, Telegram, or Discord, and strict isolation of every run in its own git worktree (Git's built-in feature for keeping multiple branches of one repo checked out in separate folders without interfering with each other).
Official repository card for Archon, an open-source engine for deterministic AI workflows (Source: github.com/coleam00/Archon)
The factory's key architectural insight came out of painful lessons in spring and summer 2026. Early versions (including experiments with a "Dark Factory") followed a run-centric model that tracked state around one long execution run. A single giant workflow dragged a task from initial triage all the way to merging the Pull Request, simply pausing whenever it needed to ask a human something.
In practice, that model kept breaking. Real software development never moves in a straight line: reviews send code back to the builder, tests expose gaps in the plan, sessions hit API rate limits, or a VPS reboots. In a long run, context had to be passed between steps via text handoff files, which routinely dropped small but critical details.
About three months before the November release, the team rewrote the architecture around item-centric state—storing state around each individual task. Now every pipeline stage (triage, planning, building, parallel review, gate, merge, and deploy) is a separate, short Archon workflow. A single ticket record in SQLite or local PostgreSQL serves as the source of truth, holding the current status, review round history, and all human answers.
What does this give you in practice? Every agent at a new stage starts with a completely fresh context window. Instead of dragging baggage from earlier failed attempts, it cleanly loads the ticket card and relevant artifacts from the database. If the server reboots, your internet drops, or a provider hits a rate limit, nothing breaks. You simply restart that single step while the ticket's full history stays intact.
The official ai-software-factory template (MIT license, 563 stars) is already open source and pinned to a specific Archon branch (factory/sdlc-on-dev). To run it locally or on a VPS, you need git, Python 3.10+, the gh CLI authenticated with the workflow scope (gh auth login -s workflow and gh auth setup-git), the bun runtime, the uv package manager, and any supported coding agent (Claude Code, Codex, or Pi).
# 1. Clone the factory template next to your project,
# but outside the application repository itself
git clone https://github.com/coleam00/ai-software-factory \
~/ai-software-factory
# 2. Enter your project root and run initialization
python3 ~/ai-software-factory/bin/factory.py init
The installer pulls the pinned Archon revision and sets up the core SDLC workflows: archon-loop handles regular build-and-check cycles, while archon-manager watches for stalled runs. At first, it's best to leave the automatic schedule turned off and run at least one ticket manually so you can watch how each stage behaves on your repository.
Attention Queue, stage policies, and concurrency limits
Discussions about working with agents usually swing between two extremes: either a human clicks "OK" on every tiny step (human-in-the-loop), or everything runs unattended until something catches fire. The Archon factory uses a middle ground called human-on-the-loop, where the human sits above the cycle. You set the goal at the start, answer only ambiguous forks, and accept the finished release on a staging environment.
To avoid pinging the developer every minute without stalling the entire pipeline, they built the Attention Queue. The mechanic is simple: any factory stage can raise its hand and say it's risky to proceed without human input. In Bug Swarm, for example, a planning agent might hit a design question: should a grenade explode on a timer or on wall impact? It sends the ticket card to the Attention Queue along with short context, options, and its own recommendation.
That specific ticket pauses, while the other four features keep moving smoothly down the pipeline. As soon as you reply in the Archon web UI or right inside the orchestrator chat, the engine picks up your decision and launches the next stage automatically.
The rules for when an agent must call a human aren't hardcoded. They live in separate policy documents per stage, kept apart from general repo instructions like CLAUDE.md or AGENTS.md. This lets you dial trust up or down gradually. You start with strict policies so the factory checks in often. Once you see steady results on routine tasks, you narrow the escalation triggers and get fewer notifications.
Another practical detail is per-stage concurrency limits. Archon lets you cap how many tickets can run in the same stage at once: for instance, a maximum of two in planning and three in triage. Without this brake, unbounded parallelism quickly overwhelms the machine (especially when several agents spin up browsers to test a game at the same time) and creates dependency conflicts across branches.
User acceptance testing (UAT) isn't attached to every single Pull Request either. Tasks are grouped into a milestone or work order and verified together on a single staging environment, just as in the Dyna Chat project. Manually checking every small PR would wipe out the whole point of human-on-the-loop.
Try stepping through the interactive demo below to see how tickets move across stages, hit concurrency limits, land in the Attention Queue, and bounce back from review.
Ticket Router in AI Software Factory
Notice how the flow behaves: when one ticket pauses in the Attention Queue over an unclear requirement, neighboring tasks keep moving across stages until they hit a concurrency cap. Once a human reply arrives, the paused ticket pulls its state from the database and continues with a clean context.
Anti-sycophancy review and a deterministic merge gate
One of the sneakiest flaws in AI coding is sycophancy—a model flattering its own work. If you ask an agent that just wrote a feature to review its own Pull Request in the same context window, it will almost always pat itself on the back and call the code great. Even a powerhouse like Fable 5.2 falls into this trap because its reasoning is already anchored to its earlier choices.
That's why the factory enforces an iron rule: the builder never reviews its own code. Once a PR is ready, Archon fans out three independent agents in parallel, each starting in a completely fresh context window. The first handles code review: checking architecture, readability, edge cases, and security holes. The second owns testing: running the existing suite, writing new tests for the feature, and making sure nothing nearby broke. The third acts as a product and browser tester: for a backend, it hits live API endpoints; for Bug Swarm, it literally opens a browser and plays the game like a human to verify that grenades work and the invisibility cloak blinks.
Three independent agents reviewing code before the deterministic merge gate in the Archon architecture.
Reports from all three reviewers flow into a separate Gate / Judge agent. It has three possible verdicts: approve the PR for merging, send it back to the builder with a concrete fix list (with a hard round limit so agents don't loop fixes forever), or kick the task all the way back to planning if the core implementation approach is flawed.
The final merge button is guarded by a deterministic gate—a plain script, not an AI model. It verifies a green CI status and checks that every required review artifact is present. There's no "looks good to me, let's merge" based on a model's word.
To see how these nodes fit into a single graph, here is an illustrative Archon YAML workflow based on the official graph format in the Archon documentation:
# Illustrative graph schema .archon/workflows/build-feature.yaml
name: build-feature
nodes:
- id: plan
type: agent
model: frontier
- id: implement
type: agent
# Isolate branch in a separate git worktree
worktree: isolated
- id: checks
type: parallel
steps: [code-review, test-suite, user-journey]
- id: merge-gate
# Strict script and CI check instead of a model verdict
type: deterministic
require_ci: true
You can read this graph at a glance: creative steps go to agents in isolated sandboxes, verification fans out across three independent tracks, and ordinary predictable code holds the final lock before merging.
Determinism vs. model freedom: why a single Fable 5.2 hits a ceiling
There's a healthy rule of thumb for coding agents: take control away from the AI wherever a plain script can do the job. Passing state between stages, tracking statuses, running CI, managing the merge queue, and triggering the next step after an Attention Queue reply should all be handled by deterministic code without a single attempt at "creative thinking."
Still, it's easy to overdo it. In summer 2026, the factory's creators tightened the screws too far: there were so many rigid prescribed steps that the pipeline turned into a clunky bureaucracy and crawled along painfully slowly. By autumn, they simplified the setup, keeping strict structure only at stage handoffs and checks while giving agents room to maneuver inside each step.
The idea of a "Dark Factory"—a fully autonomous pipeline with zero human involvement—failed in practice for much the same reason. Without human-on-the-loop checkpoints, the factory moved slowly. Worse, at the first vague prompt, the developer's intent started drifting, and the pipeline produced clean code that solved the wrong problem.
This raises a fair question: why build Archon, databases, and queues at all if you can just open one chat with a flagship model like Fable 5.2 and feed it everything? Over the long haul, a single session loses to the factory for three clear reasons.
First is the "dumb zone." Once a context window swells to 200,000–400,000 tokens, even the strongest model starts slipping: it forgets early constraints, mixes up files, and makes odd decisions. Splitting work into stages with fresh contexts eliminates this decay completely. Second is cost and rate limits: burning a heavy flagship model on fixing typos, triaging tickets, and reading logs is expensive and wasteful—you'll hit rate limits before you even reach the hard logic. Third is that same sycophancy problem, where one agent in one window reviews itself and misses its own bugs.
The factory mixes models of different tiers and providers to match each stage. Here is how that looks:
| Pipeline Stage | Core Work | Suitable Models | Why This Choice |
|---|---|---|---|
| Triage | Ticket classification, initial completeness check | Sonnet, Haiku, or fast classifiers | Maximum speed and tiny cost for routine work |
| Planning | Solution architecture, spotting forks for Attention Queue | Fable 5.2 | Mistakes at the start cost the most; needs the best reasoning layer |
| Build | Writing code from the approved plan in git worktree | Sonnet or GPT-6.2 | Solid balance of speed, code quality, and rate limits |
| Parallel Review | Code review, automated tests, browser scenario runs | Sonnet or GPT-6.2 (in fresh contexts) | Independent look without paying flagship prices on every check |
| Final Gate | Verdict summary + CI scripts | Judge agent + deterministic script | Prevents merging a broken PR on trust alone |
With this routing, the heavy model steps in where real design is needed, while routine checks and builds don't burn through your daily quota in two hours.
JSONL logs, System Evolution, and two factory health metrics
Sooner or later, any factory will let a bug slip through. Maybe the browser agent missed a visual glitch, or the tester only ran new tests and missed a regression in an older module. The most common mistake at that moment is quietly fixing the code by hand and moving on. A week later, the factory will step on the exact same rake.
In Archon, every prompt, tool call, and agent response is written locally to JSONL logs (JSON Lines—a plain text format where each line is a separate JSON object, easy to parse quickly). Those logs power the practice of System Evolution.
When a miss happens, the developer runs a short retrospective with the orchestrator, often using a dedicated skill like /opportunity-scan. The agent re-reads the JSONL traces from the faulty run, pinpoints which step failed and why, and proposes a targeted edit to a policy document or skill (such as an explicit rule to run the full test suite rather than selected files). The human reviews and approves the fix. The factory gets a little smarter after every failure instead of piling up manual workarounds.
To tell whether the system is healthy overall, you only need to watch two core metrics. First is time to Pull Request: in full production mode with deep planning and triple validation, one PR takes an average of 30–60 minutes. Second is the staging rejection rate—how often a built release has to be sent back during manual checks on the test environment. Secondary metrics like review-to-builder bounce counts help pinpoint why things slow down. In practice, you run into "high-quality code, but the pipeline is too slow" far more often than "the code is falling apart."
A live Bug Swarm run also exposed another real-world snag. All five parallel PRs passed their checks, then collided with merge conflicts right at the final gate because several features touched the same parts of the game. To finish the test faster, they told the orchestrator to hurry up and merge the branches manually. The game did build and deploy to Railway—and even produced a funny moment when a bot named Spicy Mango scored 3,000 points and crushed human players while they were chasing the new invisibility cloak. Still, that manual shortcut is a textbook anti-pattern for a real project.
The moment you tell the orchestrator to "skip some checks and merge faster," the entire reliability architecture falls apart. Agents take your shortcut command literally and start cutting corners where nobody is watching. If 30–60 minutes per PR feels too slow, the right fix is to simplify policy documents or swap models on fast stages—never break the gate by hand.
Offline loop on your own hardware and honest limits of local models
A natural follow-up question comes up right away: can you cut ties with cloud subscriptions and run this whole factory locally on your own hardware without sending code outside?
Architecturally, yes—and you can do it today. You spin up a local Gitea instance instead of cloud GitHub, use Archon's built-in SQLite (or local PostgreSQL) as the database, and plug in Pi as your coding agent, which can talk to local models like Qwen 3.8 or GLM 5.3. The entire loop, including ticket tracking and JSONL logs, stays on your machine or private server.
However, there is a hard boundary of usefulness you should know about upfront. Local models handle cheap or free triage, initial ticket tagging, and parts of test runs well—they genuinely save cloud quota at those stages. But local models aren't ready yet to carry full production development inside the factory.
The core issue isn't even the overall error rate, it's the nature of the errors. When a cloud model like Claude makes a mistake, the JSONL logs almost always reveal clear logic behind it: missing context, a vague policy, or a skipped test. You tweak two lines in the rules and the mistake disappears for good—System Evolution works like clockwork. Local models like GLM 5.3 regularly suffer from "random flukes" on completely obvious things. Those errors aren't reproducible systematically and can't be fixed by editing a prompt or policy, which makes an automated pipeline unpredictable. For home experiments and saving on triage, a local stack works well today, but for production code in the factory you still need strong cloud models for planning and building.


