04 / Integrate

The integration queue

What happens when changes are produced faster than the system can merge them?

A green check on each branch is not a green check on their combination. The choices differ in what they assume about independence and what they spend on CI.

What should be tested together before it lands?

01

Test a predicted future mainline

Merge trains verify cumulative states such as A, A+B and A+B+C before any of them reaches main.

Trade-off: Speculative checks consume CI and later checks may need to restart.

02

Declare the boundaries of independence

Scope-aware queues allow separate areas to move concurrently while still ordering overlapping work.

Trade-off: Scope maps can miss dependencies that cross a module boundary.

03

Move coordination earlier

Use contracts, ownership signals or merge-conflict forecasts before the changes arrive at the gate.

Trade-off: Earlier coordination reduces ambiguity but moves work into planning.

The comparison: test cumulative future states, declare independent scopes, or accept isolated risk. Those are different safety guarantees.

WHAT TO WATCHSpeculative CI runs invalidated by earlier failures.

Quote

Agent swarms and the new model economics

cursor.com · Merge conflicts

“To fix this, we created a system where a neutral third-party agent intervenes on merge conflicts and resolves them on behalf of all parties. Its only goal is to be impartial and efficient, similar to the way merge queues work in engineering teams.”
— Wilson Lin, Cursor
Take

The problem it fixes, in the same section: worker agents "either overwrite the other change or abandon their own."

  • Integrate
Quote

Agent swarms and the new model economics

cursor.com · A deep dive into the runs

“The old run accumulated more than 70,000 conflicts before we paused it, accelerating rather than stabilizing, while the new run logged fewer than a thousand over its full four hours.”
— Wilson Lin, Cursor
Take

Same task, comparable models and time budget, different orchestration. The old run also sprawled to 54 crates with three separate SQL packages; the new one settled on nine. More agent activity did not mean more delivery.

  • Integrate
Quote

An open-source spec for Codex orchestration: Symphony

openai.com · An increase in exploration from working this way

“Among some teams at OpenAI, we saw the number of landed PRs increase by 500% in the first three weeks.”
— Alex Kotliarskyi, Victor Zhu and Zach Brock, OpenAI
Take

Self-reported and not a controlled study. The same section credits the system with watching CI, rebasing, resolving conflicts and retrying flaky checks, so the gain is measured as landed work rather than code written.

  • Integrate
Video

Building Blocks for Uber’s Software Factory— Uday Kiran Medisetty & Adam Huda, Uber

youtube.com · Uday Kiran Medisetty and Adam Huda, Uber · from 16:30

“We don’t want thousands of loops being set up across the company without any bounds. You have a managed surface that you go to to set up the loop. So it runs on Sunday when we know we have better uh CI capacity available.”
Take

They also cap how many diffs engineers see on Monday morning: the loops are scheduled around CI capacity and reviewer attention. Quoted from YouTube’s auto-generated captions.

  • Plan
  • Integrate
Video

Building Blocks for Uber’s Software Factory— Uday Kiran Medisetty & Adam Huda, Uber

youtube.com · Uday Kiran Medisetty and Adam Huda, Uber · from 13:51

“it’s going to stop at just creating a draft PR and it’s not going to push it to CI yet.”
Take

Minion validates the change in the agent loop first, “to prevent a lot of extra load coming on to CI”. More than 70% of Uber’s PRs now come from local or cloud agents. Quoted from YouTube’s auto-generated captions.

  • Integrate
  • Verify
Video

Building Pi, and what makes self-modifying software so fascinating

youtube.com · Armin Ronacher or Mario Zechner · from 53:18

“with the pull request it’s even worse now because they come in so quickly, that many of them cannot be merged anyways without manual resolution of the conflict. And there’s a there’s a lack of back pressure mechanism.”
Take

An open-source project’s view of the same flood. The captions don’t label speakers, so who said this is uncertain. Quoted from YouTube’s auto-generated captions.

  • Integrate
  • Coordinate
Video

CI/CD Is Dead, Agents Need Continuous Compute and Computers — Hugo Santos and Madison Faulkner

youtube.com · Hugo Santos and Madison Faulkner, Namespace · from 9:35

“the act of merging um is starting to look a lot like um high-performance uh database problems where you have serialization and you have a single ledger where every single change needs to go in and you to lock the the database in order to be able to commit.”
Take

Their proposal is a “pre-merge” queue that reconciles parallel changes before they reach the repository. Namespace sells compute for CI and agents. Quoted from YouTube’s auto-generated captions.

  • Integrate
Video

Extreme Harness Engineering: 1M LOC, 1B toks/day, 0% human code or review — Ryan Lopopolo, OpenAI

youtube.com · Ryan Lopopolo, OpenAI · from 24:58

“We invoke a dollar land skill and that coaches code X to push the PR, wait for human and agent reviewers, wait for CI to be green, fix the flakes if there are any, merge upstream if the PR comes into conflict, wait for everything to pass, put it in the merge queue, deal with flakes until it’s in main.”
Take

The whole landing loop handed to the agent. “Dollar land” is the $land skill and “code X” is Codex in YouTube’s auto-generated captions.

  • Integrate
  • Verify
Video

Harness Engineering: How to Build Software When Humans Steer, Agents Execute — Ryan Lopopolo, OpenAI

youtube.com · Ryan Lopopolo, OpenAI · from 37:04

“with each engineer producing three to five PRs per day, even on a team of three, merge conflicts were super miserable, right? Because these PRs tended to be pretty big, we were working on the same parts of the code base.”
Take

Two fixes: restructure the code so less of it overlaps, and keep PRs open for less time. PRs stayed open waiting for human review, so a review agent now runs on every push and blocks a merge on serious findings. Quoted from YouTube’s auto-generated captions.

  • Integrate
  • Verify
  • Plan
Quote

Harness engineering: leveraging Codex in an agent-first world

openai.com · Throughput changes the merge philosophy

“In a system where agent throughput far exceeds human attention, corrections are cheap, and waiting is expensive.”
— Ryan Lopopolo, OpenAI
Take

The repository runs with minimal blocking merge gates and short-lived pull requests, and handles test flakes with follow-up runs. The opposite bet to Stripe’s cap on CI rounds.

  • Integrate
  • Verify
Video

How Building with AI Can Double the Throughput of Your Engineering Team — Brian Scanlan, Intercom

youtube.com · Brian Scanlan, Intercom · from 20:39

“like our CI melted we had to fix that”
Take

After doubling PR throughput, Intercom says code review is its current bottleneck. 17.6% of PRs are approved automatically, an approver tuned on past data and human labels. A skill fixes flaky specs across hundreds of thousands of tests. Quoted from YouTube’s auto-generated captions.

  • Integrate
  • Verify
Quote

How to operate shared platforms safely at agent scale

datadoghq.com · Prevent recovery behavior from amplifying contention

“For example, 10 agents making 3 attempts each results in 30 executions, even before considering tool-call fan-out. If each attempt triggers multiple APIs or CI jobs, downstream work increases faster than the number of agent runs.”
— Datadog
Take

Retries multiply the load on shared services. Datadog’s answers are retry budgets, bounded concurrency and circuit breakers.

  • Integrate
  • Coordinate
Quote

Inside OpenAI’s agentic software factory

newsletter.pragmaticengineer.com · 2. Death of the IDE & pull requests

“We’re talking about roughly a 10x increase in load on some systems. At most companies, that kind of growth might happen over two or three years. At OpenAI, we see it in about six months. That level of acceleration exposes bottlenecks everywhere”
— Venkat Venkataramani, OpenAI
Take

Version control, CI/CD and release processes all have to absorb it. OpenAI’s answers include agents that babysit a PR to green, review tiered by risk with auto-approval in low-risk areas that opt in, and specialized review agents.

  • Integrate
Quote

Merge fast or merge cheap: Fine-tuning merge queues to handle an increase in PRs from AI agents

trunk.io

“And we really rapidly became bottlenecked on other things like our merge queue, which is the get in line to get your change accepted by the system that then deploys into production. We had to completely re-architect it because so much more code was being written and so many more pull requests were being submitted that it just completely blew out the expectations of it.”
— Mike Krieger, Anthropic
Take

Quoted in a merge-queue vendor’s post, which does not link the original talk, so this is Trunk’s transcription. Trunk’s own simulation shows the trade-off: batches of 16 cut CI time per PR by 77.5% but merged PRs 54.9% slower.

  • Integrate
Quote

Merge Queues Were Built for Humans. Agents Don’t Wait.

julien.danjou.info · What the queue does not fix

“Green is not coherent. Ten agent PRs can each pass CI alone, pass again as a batch, and still be a mess together: three flavors of the same helper, two designs pulling in opposite directions, a thousand lines no human read. A merge queue keeps main buildable. It does not keep main good.”
— Julien Danjou, Mergify
Take

From a merge-queue vendor’s CEO, which he discloses. He argues queues must speculate, batch and bisect at agent volume, and that flaky tests break the bisection.

  • Integrate
  • Verify
Quote

Minions: Stripe’s one-shot, end-to-end coding agents

stripe.dev · How do minions work?

“Since CI runs cost tokens, compute, and time, we only have at most two rounds of CI.”
— Alistair Gray, Stripe
Take

A hard cap instead of letting agents retry until green. After the second push, the branch goes back to a human. Flaky tests that CI detects become tickets a minion can pick up.

  • Integrate
  • Verify
Quote

Mitchell Hashimoto’s new way of writing code

newsletter.pragmaticengineer.com · Transcript, 1:33:38

“And it’s not an AI review problem or anything. It’s really just like a release problem, like managing the merge queues, humans getting access to the right set of data in the repository and things like that.”
— Mitchell Hashimoto
Take

He is describing the agent-heavy companies he talks to: the churn agents cause is far greater than humans cause. Machine transcript.

  • Integrate
Quote

Mitchell Hashimoto’s new way of writing code

newsletter.pragmaticengineer.com · Transcript, 1:31:35

“I think merge [queues] works for humans at a certain scale, but the merge [queues] could get quite deep. But then if you sort of 10X that, like, conservatively, I think 10X that, and then if you buy into, like, hype cycles and you 100 or 1,000X that, I think it gets completely untenable”
— Mitchell Hashimoto
Take

Quoted from the machine transcript on the newsletter post.

  • Integrate
Video

Nicole Forsgren: Leading high-performing engineering teams in the age of AI - The Pragmatic Summit

youtube.com · Nicole Forsgren · from 2:14

“There were a handful of people probably managing a security review process or a launch process or a deployment process or, you know, sometimes reviews were a little slow and they got backed up. Well, now we just threw gas on the fire”
Take

Release steps such as picking candidate builds and cherry-picks were always manual and human-sized. Quoted from YouTube’s auto-generated captions.

  • Verify
  • Integrate
Video

OpenAI: How AI is reshaping the craft of building software - The Pragmatic Summit

youtube.com · Vijaye Raji, OpenAI · from 8:22

“What’s going to happen is like there’s going to be more uh code being written which means that code reviews will become the bottleneck and then after code reviews uh integrations and deployment CI/CD will become the bottleneck.”
Take

Quoted from YouTube’s auto-generated captions.

  • Verify
  • Integrate
Quote

Ralph Wiggum as a “software engineer”

ghuntley.com

“If you were to fan out to a couple of hundred subagents and then tell those subagents to run the build and test of an application, what you’ll get is bad form back pressure. Thus, the instruction above is that only a single subagent should be used for validation”
— Geoffrey Huntley
Take

Fan out the reading and writing, but serialize the build and test.

  • Integrate
  • Plan
Quote

RFC Deterministic Worktree Lifecycle

github.com · Issue #209, Problem

“Retries restart from a moving HEAD, dependent members can miss predecessor source, independent outputs reach review without integration, and approval can detach from the published commit.”
— sarendipitee, on GitHub
Take

Tie review to the exact commit that ships, and invalidate the approval when a fix changes that commit.

  • Integrate
  • Verify
Quote

Stop parallelizing your AI agents

thedailydeveloper.substack.com

“The merge tax is superlinear. Each resolved conflict changes the base, invalidating other branches’ assumptions.”
— Dave Paola
  • Integrate
Quote

Ten agents one release

bernstein.readthedocs.io

“parallel agents are bottlenecked not by their code quality but by the convergence points in the codebase.”
— Bernstein maintainers
Take

Ten parallel tickets produced three conflicts, all in one file where every command is registered. Their fix is structural: split registration into per-package files that the entry point discovers.

  • Integrate
  • Plan
Quote

Uber’s AI infra, from the inside

newsletter.pragmaticengineer.com · Transcript, 57:35

“as we are ready for the influx of PRs, we, in fact, had to, like, add internal code [red] for our CI system because year over year, the number of CI jobs also doubled or more than doubled.”
— Uday Kiran Medisetty, Uber
Take

Agent volume hit CI capacity first. About 15% of Uber’s production PRs go through Minion, its background agent platform. Quoted from the machine transcript on the newsletter post.

  • Integrate
Quote

Uber’s AI infra, from the inside

newsletter.pragmaticengineer.com · Transcript, 55:12

“So first thing that we did was we took a whole bunch of like simple CI jobs that used to run once you create the PR and we moved it to inner loop and we kept all of this behind one single command”
— Uday Kiran Medisetty, Uber
Take

Linting, coverage, build and template rules now run inside the agent loop, behind one validate command, before a PR exists. Uber added self-healing CI as well. Machine transcript.

  • Integrate
  • Verify
Quote

Uber’s AI infra, from the inside

newsletter.pragmaticengineer.com · Transcript, 1:15:02

“every Sunday, when we don’t have that much CI load, it will generate a new PR for this service using that code cleanup.”
— Uday Kiran Medisetty, Uber
Take

Bulk maintenance scheduled for when CI has spare capacity. Fox is Uber’s self-improving codebase agent. Machine transcript.

  • Plan
  • Integrate
Quote

Welcome to Gas Town

steve-yegge.medium.com · Gas Town 101, Refinery

“The baseline can change so much during a swarm that the final workers getting merged are trying to merge against an unrecognizable new head.”
— Steve Yegge
Take

Worktrees stop agents editing the same files at the same time. They don't stop conflicts at merge time.

  • Integrate
Quote

Why Merge Conflicts became the new Agentic Bottleneck

adamtornhill.substack.com

“Recurring merge conflicts are the canary telling you that there is a misalignment between a) the work you do, and b) the type of work your architecture supports.”
— Adam Tornhill, CodeScene
Take

He argues stacked PRs and smarter queues patch symptoms. His fix is to find hotspots and change coupling, then split them along domain boundaries so parallel tasks land in different places.

  • Plan
  • Integrate
Quote

Why We Built Our Own Background Agent

builders.ramp.com · Sandbox

“This ensures that at most, the repository is 30 minutes out of date”
— Ramp
Take

Every Inspect session starts from a repository image rebuilt every 30 minutes, so isolation comes with a known staleness bound. Inspect writes about 30% of merged PRs in Ramp’s frontend and backend repositories. The Pragmatic Engineer later reported 75%.

  • Isolate
  • Integrate
Quote

Worktrees (AI Development Setup)

stevekinney.com

“Then integrate serially: merge one, re-run the full suite, merge the next. Branches that pass alone can fail together…”
— Steve Kinney
  • Integrate

Tools filed under integrate

Preview · not yet reviewed by a human