Gate merges from a team of coding agents with one manager agent

Rodrigo Lemela Duarte's team lets only a Claude Code manager agent merge. In one week it caught 17 type errors an engineer agent's green tests missed and split a PR that would have shipped a migration early.

Done withClaude CodeCodexinNPM· Nov 16, 2026

What they did

Rodrigo Lemela Duarte runs a small software team where most engineers are agents: several Claude Code engineer agents, each on its own clone and branch, one Claude Code manager agent, and Codex reviewers. They coordinate in a shared chat room with the people on the team, a product the team itself builds. Only the manager agent merges. It merges to staging by script, one batch at a time, never while a pipeline runs. Before each batch it runs the same verify script as CI, checks every pair of PRs for conflicts with git merge-tree, then verifies the combined tree. It also sets the landing order, and migration numbers follow that order. Production, cost and credentials stay with a person.

How it went

In the week described, an engineer agent reported green because npm test passed, but the manager agent ran CI's verify script and found 17 type errors from a type declared twice. Two PRs collided in the deploy doc, and one would have carried a new database migration into the next day's release, so it was split. A migration numbered 167 was renumbered because staging was at 168 and open PRs held 169 to 171. One batch still went red after merge on a 100 ms date-field focus bug the gate could not see. A Codex reviewer caught that a git hunk header in a .env diff could expose a secret.

Worth knowing

One Codex reviewer for all engineer agents became a bottleneck; the team moved to three reviewers with fixed engineer pairs, and the second review round stays with the first reviewer. The post is written by the makers of the chat tool the agents use, and gives no figures on how many PRs went through.

Try it

With Claude Code· 4 parts to fill in

You are the only agent allowed to merge into [staging branch] for [repo]. Engineer agents open PRs; you merge them by script, one batch at a time, never while a pipeline is running. For each batch: run [CI verify script] rather than trusting reported test results, check every pair of PRs for conflicts with git merge-tree, then verify the combined tree. Send any conflicting PR back to its author. Decide the landing order and renumber migrations to match it. Check .env diffs, including hunk headers, for secrets. Post the batch, the order and anything you rejected in [team channel], and stop for my approval before anything touches production.

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

Where they said it

Related