Skip to content
Stacks

AI writes 2,000 lines in one shot.
Stack them.

Stacks turns every commit on your branch into its own pull request. One local branch with standard Git, each commit its own focused PR. Reviewers see small diffs. Your merge queue handles the rest.
Code review, unblocked.

Read the docs
Terminal
$ mergify stack push
Creating stacked PRs...
  PR #421 ← refactor: extract auth middleware  ✓ created
  PR #422 ← feat: add OAuth2 provider support  ✓ created
  PR #423 ← feat: add token refresh logic      ✓ created
  PR #424 ← test: add auth integration tests   ✓ created
Stack pushed. 4 PRs created and chained.

Used by platform teams at

From fast-moving startups to well-known enterprises

The 2,000-line PR that nobody actually reviews

An AI agent refactors your authentication layer in 40 minutes. It touches 47 files and produces a single pull request with 2,100 lines changed. Two reviewers approve it within an hour. Neither read past the first 300 lines.

This is the new normal. AI coding tools generate complete, working changesets at a pace that makes large PRs inevitable. The code is often correct. The reviews are almost never thorough. When something breaks in production, nobody can point to which change caused it because the diff was a wall of text that got a rubber-stamp approval.

The problem is structural. You can't review what you can't hold in your head.

AI Agent 40 min session 1 PR 2,100 lines changed · 47 files R1 Skimmed 300 lines LGTM ✓ main Bug ships. Nobody knows which change. Repeats every single day

Problems that multiply with every AI-generated changeset

The bigger your PRs get, the worse each of these becomes.

Reviews become theater

Review quality drops sharply after 400 lines. A 2,000-line PR gets surface-level skimming and a polite "LGTM." Bugs hide in the parts nobody read.

Rollbacks take the whole feature

When one change in a monolithic PR causes a production issue, you revert everything. The 90% of changes that were fine get rolled back too.

Review bottlenecks multiply

Large PRs sit in review queues for days because nobody has 2 hours to read them. Smaller PRs get reviewed in minutes. The throughput difference compounds across a team.

Context is impossible to transfer

When an AI agent writes code across 47 files, the reviewer reconstructs the agent's reasoning from the diff alone. Stacking gives each PR a clear, single purpose.

We went from PRs sitting in review for days to getting them merged the same afternoon. Stacking forced us to write smaller, clearer commits. Reviewers stopped procrastinating because each PR was a 10-minute read, not a 2-hour slog.

Marie Laurent

Marie Laurent

Senior Software Engineer at SG

Zero setup

One prompt. Your agent does the rest.

No GitHub App to authorize. No dashboard to log into. No OAuth flow. Paste this into your AI agent and it installs the CLI, the skill, and the Git hooks for this repo.

Paste into your AI agent
Install Mergify Stacks in this repo. Follow https://docs.mergify.com/stacks/agents.md

Works with Claude Code · Cline · Codex · Copilot · Cursor · any skill-compatible agent

No GitHub App to authorize
No dashboard to sign up for
Free & open-source CLI

Same code, same branch, four reviewable PRs

Stacks maps each commit on your branch to its own pull request. You keep working in a single local branch with standard Git. Mergify handles the PR chain and keeps everything in sync. Reviewers see 200-line diffs, not 2,000-line walls.

One branch, many PRs

Each commit becomes a separate PR with its own reviewers, CI run, and approval status. Your local workflow stays a single branch with standard Git commands.

PR #1 PR #2 PR #3 PR #4

Automatic dependency chain

Stacks sets the base branch of each PR to the previous PR in the chain. GitHub shows only that PR's diff, not the cumulative change. Reviewers see exactly what changed in that commit.

main PR #1 (base: main) PR #2 (base: PR #1) PR #3 (base: PR #2)

Two new commands. The daily workflow.

Install is a one-time prompt to your agent. After that, stacks lives in your terminal with the Git commands you already know.

Terminal
# Create a new tracked branch
$ mergify stack new feat/auth-overhaul
# Commit your changes (Change-Ids added automatically)
$ git commit -m "refactor: extract auth middleware"
$ git commit -m "feat: add OAuth2 provider support"
$ git commit -m "feat: add token refresh logic"
# Push all commits as separate, chained PRs
$ mergify stack push
Creating stacked PRs...
  PR #421 ← refactor: extract auth middleware  
  PR #422 ← feat: add OAuth2 provider support  
  PR #423 ← feat: add token refresh logic      
Stack pushed. 3 PRs created and chained.

Smart updates

Amend a commit and push again. Only the PR for that commit gets updated. The others keep their reviews and CI status intact.

Merge queue integration

When the first PR in the chain is approved, it enters the merge queue. After it merges, the next PR automatically becomes merge-ready.

GitHub

Review in GitHub directly

No external app, no extra dashboard. Stacked PRs are regular GitHub pull requests. Your reviewers use the tools they already know.

GitHub

See the stack inside GitHub.

Stacks work in GitHub without anything extra. A free browser extension is also available, adding a richer view of the chain and revision history inside the PR page itself.

Mergify Stacks browser extension showing the stack chain and revision history inside a GitHub PR page

Stack at a glance

Every PR in the stack appears on the PR page you opened, with its status and your position in the chain.

Revision history

A timeline of every revision, with commit SHAs. Click any one to see what changed between reviews.

GitHub

No second tool to merge

Reviews and merges go through GitHub and your queue. The extension only adds context, so your stack works the same way whether you install it or not.

Already drowning in AI-generated PRs?

See how Stacks breaks them into reviewable pieces. Free, open-source CLI. No dashboard, no external app. Just Git and GitHub.

Get started free

Built for the age of AI-generated code

AI coding agents don't think in small PRs. They think in complete features. Stacks is the missing layer between AI output and human review.

Change-Id persistence

Every commit gets a unique Change-Id that survives rebases and amends. When you push again, Stacks matches commits to their existing PRs. No duplicate PRs. No lost review context.

commit abc123 Change-Id: Ia4f... rebase commit def456 Change-Id: Ia4f... Same ID, same PR

Skip what didn't change

When you amend commit #2 in a 5-commit stack and push, only PR #2 gets updated. PRs #1, #3, #4, and #5 keep their approvals and CI status. Reviewers re-review only what actually changed.

PR #1 PR #2 updated PR #3 PR #4 PR #5

Our AI coding agent kept producing 1,500-line PRs. Nobody wanted to review them, so they sat open for a week. Stacks turned those into four or five focused PRs that went through review in a day. It changed how our whole team works with AI-generated code.

Erik Johansson

Erik Johansson

Platform Engineer at Wavefront

Coming from another stacking tool?

See how Stacks compares to gh-stack and other tools. Honest comparison, no spin.

Compare tools

Stop shipping 2,000-line PRs

Stacks turns commits into reviewable PRs. Free CLI, no sign-up required.