Run an AI software factory that opens, reviews, and merges PRs
A guide to building agents that open, review, and merge pull requests. ·
Done with a custom-built or unnamed agent
- What they did
- The guide breaks a software factory into five stages: intake, isolation, tools, verification and a merge gate. It draws on published setups from Stripe, Spotify, Shopify and Ramp. It gives configs for each stage, including an issue filter, git worktrees per agent, a shared MCP tool block, a screenshot-verification skill and tiered merge rules. A human reviews at the end.
- How it went
- Microsoft's dotnet/runtime data shows agent PRs merging 67.9% of the time against 87.1% for engineers, and 55.1% when fully autonomous. Review capacity becomes the bottleneck, and proven results are mostly mechanical migrations.
- Worth knowing
- Build the gates before the fleet, and start with one gate where agents cause the most rework. Worktrees start empty, with no .env, dependencies or free port, and non-interactive runs don't clean up after themselves.
Try it yourself with Codex
Set up a workflow for the repository [repo name] where an agent picks up issues labeled [label], opens a pull request with a fix and tests, and a second agent reviews it. Write the configuration and a short guide for how it runs. Do not enable automatic merging yet; show me the merge rules you propose and wait for my approval.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Discussion on HN · Sep 11, 2026
Related use cases
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Autonomously test an entire iOS app and report bugs
A tool lets Claude Code drive an iOS app through the accessibility tree, tap every screen, and return a structured bug summary.
Audit a feature's issues and hand them to an engineer's agent
An AI agent listed all issues with a feature and sent them to an engineer, whose own agent then addressed most of them automatically.
Custom agent
Build small features and integrations with Cursor agent mode
A commenter uses Cursor agent mode for smaller features, third-party integrations, background jobs, notifications and activity tracking, and has it log key findings to a worklog file for the next run.
Cross-check coding agent answers with a second agent
The poster built a tool that automatically sends Claude Code responses to Codex for a second opinion, replacing manual copy-pasting.
Upgrade vulnerable dependencies via automated pull request
Devin opened a PR on a Spring Boot and Next.js sample app upgrading dependencies to fix listed CVEs, including 103 npm vulnerabilities on the frontend.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.