CI/CD & DevOps

What is a merge queue?

A system that tests approved pull requests against the latest main before merging. Why it prevents broken builds.

By the Hyrax team·5 min read·June 15, 2026
TL;DR
  1. 1.The problem it solves
  2. 2.How a merge queue works
  3. 3.When you need one
  4. 4.How it fits with checks and review
A merge queue is a system that lines up approved pull requests and tests each against the latest main branch before merging, one at a time. It prevents broken builds caused by changes that passed in isolation but conflict once combined.

The problem it solves

A pull request is usually tested against the state of main at the time it was opened. If two pull requests pass their checks separately, they can still break main once both are merged, because neither was tested against the other.

This is the gap a merge queue closes.

How a merge queue works

Once a pull request is approved, it enters the queue instead of merging straight away.

  1. The queue takes the next approved pull request in line.
  2. It tests that change against the current tip of main, including anything merged ahead of it.
  3. If the checks pass, the change merges.
  4. If they fail, the queue removes it and moves on, so one bad change does not block the rest.

When you need one

A merge queue earns its place when many changes target the same branch at once.

  • High volume: a busy main branch with frequent merges.
  • Large teams: many engineers merging in parallel.
  • Slow checks: long test suites make conflicts more likely during the wait.

Smaller teams with low merge volume often do well without one and can rely on continuous integration alone.

How it fits with checks and review

A merge queue does not replace review or testing. It runs after both.

Code review approves the intent of a pull request, continuous integration runs tests on the change, and the merge queue re-runs checks against the latest main so the merge is verified, not assumed. Automated code review strengthens the queue by resolving findings before a change is ever queued.

Frequently Asked Questions

Why use a merge queue?

It prevents broken builds on a shared branch by testing each approved change against the latest main before it merges, rather than against an older snapshot.

What is a semantic conflict?

A conflict that version control does not catch: two changes merge cleanly as text but break each other in behavior. A merge queue catches these because it runs tests on the combined result.

Do small teams need a merge queue?

Often not. With low merge volume, conflicts are rare and continuous integration is enough. The value rises with team size and merge frequency.

Stop flagging. Start fixing.

Hyrax reviews your pull requests, remediates issues autonomously, and closes the ticket.

Start free