TLDRocket
Sign in

Turn one giant AI-generated pull request to a reviewable stack

The GitHub Blog

GitHub is pushing stacked pull requests as the fix for AI agents dumping 1,000+ line diffs on reviewers. Instead of one giant PR, agents split work into small, dependent layers you can review one at a time.

There's a specific moment every developer dreads: an AI coding agent finishes a feature request, and what comes back is a single pull request with 1,700-plus lines changed, a vague auto-generated description, and zero obvious starting point for review. GitHub's latest engineering post names that moment directly and offers a fix that's less about smarter AI and more about better plumbing: stacked pull requests.

The idea itself isn't new — engineers have split large changes into chained branches for years, mostly by hand, mostly painfully. What's changed is that coding agents have made the problem worse. Gartner projects a 50% productivity gain across the software development lifecycle by 2028 thanks to agents, but productivity in generating code doesn't fix the bottleneck at review time. If anything it moves the bottleneck earlier and makes it bigger, because agents trained on how code has traditionally shipped default to producing one giant, undifferentiated commit covering data models, API routes, UI wiring, and error states all at once.

GitHub's answer is to teach the agents the same discipline you'd want from a human team: decompose the feature into a dependency chain — say, a catalog data layer, then a search API on top of it, then chat wiring on top of that, then UI citations on top of that — and assign each layer to a dedicated agent (data modeler, backend, frontend) with its own scoped pull request. The company shipped tooling to make this practical, including a `gh-stack` CLI extension and a skill agents can install so they know how to initialize, add, push, and submit a stack rather than just YOLO-ing a single branch.

The reviewer experience is the actual payoff here. Instead of drowning in one pull request, a human reviews bottom-up through a stack map, starting with the foundational layer and building context upward, while reading the stack top-down first to understand the end goal. When Copilot's automated review flags an issue in the base layer, fixing it doesn't mean manually patching three dependent branches — a `gh stack sync` command cascades the rebase upward, repushes everything, and re-runs CI across the whole stack automatically.

Worth flagging: GitHub's own post admits the slick one-click 'Rebase stack' button on the web UI has a catch. It runs on GitHub's servers, resets the commit author to whoever clicked it, and produces unsigned commits — which quietly breaks any repo that requires signed commits under branch protection. The workaround is doing the rebase locally through the CLI instead, which somewhat undercuts the pitch of frictionless one-click stack management.

My take

This is GitHub quietly admitting that agent output is only as good as the review pipeline it lands in, and that's the correct instinct — throwing faster code generation at teams without fixing review bandwidth just moves the pile-up downstream. The unsigned-commit gotcha on the flashy rebase button is a good reminder that developer tooling vendors love shipping the convenient path first and burying the security caveat three paragraphs down; anyone with signed-commit requirements should read that section twice before clicking anything.

Read more about this at: The GitHub Blog

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.