Run a crew of coding agents like a production service from team chat

Fabricio Santecchia built Factory, where teammates ask for changes in chat and agents plan, code, test on iOS simulators and open PRs; 121 of 131 PRs merged in seven weeks.

Done withCustom agent· Nov 9, 2026

What they did

Santecchia started building a system he calls Factory in September 2026. A teammate posts a change request in the team chat. A long-lived daemon records every event as a letter in an append-only SQLite database, and headless coding agent sessions, which he calls seats, pull work from it. A lead seat per thread plans the job and talks to the requester, executor seats write code in their own git worktree and drive a leased iOS simulator to prove UI changes, a QA seat on a model from a different vendor judges the result blind, and a chief seat supervises. The result goes back to the chat thread as a pull request with screenshots. Executors switch to a second vendor when quota runs out. A separate watchdog with no model in it checks the system on its own clock, and rules that matter (pushes, simulators, approvals, outgoing messages) are enforced by code rather than prompts.

How it went

From September 16 to November 5 the system opened 131 pull requests and 121 were merged. In a sample of 100 requests, 90 came from 11 teammates other than him. Moving chat intake to its own thread cut p99 request to decision time from 31.6 seconds to 0.45. A slimmed simulator profile cut memory per simulator from 4.3 GB to 1.6 GB. The worst incident: model credentials expired and 17 agents kept taking empty turns for about 2.5 hours while every health signal looked fine. The watchdog now pages a person when turns produce nothing, and detection takes under 30 minutes.

Worth knowing

He says the agents were the easy part and most of the work was the operations around them: a single writer, leases on scarce resources, failover between vendors and gates the agents cannot talk past. Check that agents produce output, not just that processes are alive. He does not name the agent tools, the chat app or the models.

Try it

With Custom agent· 4 parts to fill in

Help me set up a pipeline where requests posted in [my team chat channel] become pull requests on [my repo]. For each request, plan the change and confirm scope with the requester, then have an executor make the change in its own git worktree, run [the test suite] and capture [screenshots from the simulator or browser] for UI changes. Have a reviewer on a different model judge the diff without seeing the executor's reasoning. Log every event to an append-only store so a crashed worker can resume. Enforce push and deploy permissions in code, not in the prompt. Stop at an open pull request and post it back to the thread; never merge or deploy without my approval.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related