Challenges building factories at scale
_Me and Daniel Sinai gave this talk at AWS Experience Tel Aviv on November 18, 2026. The talk is in Hebrew, you can view the slides here.
Day one: it works
Day one of almost every factory looks the same. A ticket comes in, say a small UI change, and it moves down a line:
- Plan: an agent writes a spec.
- Build: an agent opens a PR.
- Review: a human. If there are comments, the work item goes back to Build and the agent fixes it.
- Release: not an agent anymore, just a regular workflow. Merge, CD runs, check that production is healthy.
And it works. This part is relatively easy today: ask a coding agent to build you a line like this (don't forget "make no mistakes") and you'll probably get one.
A few weeks later, the challenges start.
1. Can another team build a line?
The first line is usually built by the platform team. Soon other teams show up, security, SRE, frontend, and each of them has repetitive work they'd like a line for.
If every team builds alone, you end up with several small factories that don't talk to each other. We had this ourselves: a few code review skills that did almost the same thing.
What works is an org standard that every line inherits: line templates, shared skills, approved agents and MCPs, policies and review rules. On top of that, each team adds what's specific to its own work. Every team gets its own line without taking the factory apart.
2. What happens when it breaks?
When hundreds or thousands of tickets go through the factory every day, things break. A sandbox fails to start, the owner rejects a plan, the model hallucinates an API, a run gets stuck with no progress.
Each of these needs different handling. A rejected plan should go back to planning with the comments attached. A sandbox that didn't come up probably just needs a retry. A stuck run should escalate to a person. The factory has to know which is which.
The factory only works if people can rely on it. When it doesn't handle failures, people start working around it: rerunning items by hand, fixing PRs outside the line, pushing stuck work along themselves. That's when it turns into chaos. Duplicate pull requests get opened for the same item, review standards stop applying because work skips the line, and items get stuck without anyone knowing.
3. Is this line worth it?
Once the factory survives failures, management asks whether each line is worth it. To answer, every station needs its own numbers: how many items passed, how long they took, how many retries.
The example we showed (illustrative, not real data) was a bug-fix line. 120 work items came in, 112 plans were approved and 96 PRs were opened. Only 46 ended up merged with no human edits and not reverted.
That last number is the one that matters. The funnel also shows where the line leaks: here, between "PR opened" and "merged with no edits", so that's where to improve.
Use the same metrics for every line, so you can compare them and decide what to expand and what to shut down.
Some lines also need metrics of their own. A line that fixes security vulnerabilities, for example, should track whether critical vulnerabilities get fixed within their SLA, say a set number of days. A line can look healthy on the shared metrics and still miss the one number it exists for.
4. Who reviews all of this?
This is the one we hear about the most, from customers too. A factory produces far more PRs than people can review.
Review agents that make the human's job easier help. But you also need to know the risk of each PR and which reviewers it actually needs, so you can drop the reviews that don't add anything.
A DB migration in a tier 1 billing service should get a deep review from the owner and two seniors. A test change on an admin settings page can merge on checks with no human review. To make that call, the factory needs context from your SDLC: who owns the service, how critical it is, what kind of change it is.
5. How do you put guardrails on it?
Once the factory decides on its own what needs review, it needs limits. Before you let it run all night, you need three kinds of guardrails:
- Human approval: where a person has to sign off before the line continues. A plan for a tier 1 service, anything touching payments, a production deploy. And always a record of who approved and when.
- Checkpoints: automatic checks on each station's output. The plan has acceptance criteria, the tests are green, risk was assessed using the context, and nothing merges while there's an open incident.
- Spend limits: a budget per line, per agent and per run. The agent that gets stuck in a loop at 2 AM hits the limit, not the end-of-month invoice.
6. How does the factory keep improving?
Every run leaves information behind: where it failed, where a human stepped in, what context was missing. That turns into a loop. Lines run, you see where they got stuck, you figure out what was missing, and you fix it in the factory itself. The next run happens on a better factory.
If the same comment shows up on every review of agent PRs, nobody should be writing it for the hundredth time. It should become a rule in REVIEW.md, or a skill.
Many of these fixes aren't about agents at all. A flaky test, a service with no owner, a missing runbook. Fixing them helps the developers as much as the agents.
What you own at scale
How you build the first line barely matters. It'll work. Whether the factory scales comes down to six disciplines, and none of them are new:
- Platform engineering: a standard other teams can build their lines on.
- Factory experience: escalation paths and guardrails that make the factory reliable and trustworthy.
- Measurement: shared metrics on every line so you can compare them, plus the ones a specific line exists for, like time to fix critical vulnerabilities.
- Risk management: review effort that follows risk, based on context from the SDLC.
- Governance: approvals, checkpoints and budgets in place before the factory runs unattended.
- Continuous improvement: every run feeding back into the factory and into the SDLC.
Your org already practices these for the work people do. A factory runs far more work through them, so operating it at scale needs controls that keep it safe, and a model for improving it over time.