guides
Stacked diffs make CI more expensive — do them anyway
Stacking multiplies pipeline runs. The fix is concurrency control, not fewer pull requests.
Jess Okonkwo · Co-founder · 2026-03-25 · 5 min read
Stacked pull requests are good practice and they are genuinely more expensive in CI: rebasing the bottom of a stack invalidates every branch above it, and each one re-runs.
Where the cost actually goes
Not in the extra pull requests — in the re-runs triggered by restacking. A five-deep stack rebased three times is fifteen pipeline runs, most of whose results nobody reads because another rebase is already coming.
What to do instead of stacking less
- Concurrency cancellation keyed on the ref, so a restack cancels the superseded run immediately
- Run the full suite only on the bottom of the stack and on merge; run fast checks on the rest
- Use affected-target detection so an unrelated branch in the stack does not rebuild everything
- Draft pull requests get the reduced pipeline until marked ready
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
CI when your teammates are agentsAI coding agents push far more often than humans. Here is how that changes pipeline design and cost control.Why we publish instructions for leavingEvery migration page on this site includes the diff to migrate back off us. Here is the reasoning.What we learned running a million CI jobsQueue time, cache behaviour, right-sizing and the failure modes that only appear at scale.Stop retrying flaky testsAutomatic retries convert a real bug into an intermittent one, and train your team to distrust every failure.