Turn one giant AI-generated pull request to a reviewable stack
GitHub introduces stacked pull requests to break down large AI-generated code changes into smaller, independently reviewable layers, addressing the review bottleneck created by AI coding agents.
Intelligence analysis by Llama

GitHub's stacked pull requests feature lets developers and AI coding agents break a single massive AI-generated change into a chain of small, logically ordered PRs. Each layer is independently reviewable, evaluated against a defined stack base, and supported by a gh-stack CLI plus a skills bundle for agents.
Imagine a robot helper writes a whole story in one giant page, which is hard to read. GitHub now lets the robot split the story into short chapters instead. Each chapter is small enough for a friend to check quickly, and they all still fit together at the end.
Analysis
The 1,721-line PR problem
The post opens with a scenario most engineering teams now recognise: a coding agent returns a single pull request that mixes a new data model, an API route, client wiring, and UI states into one diff. The author walks through an example of adding product search to a shopping assistant, where the "first draft" lands as a 1,721-line change with a "long-yet-shallow AI generated description." Reviewers, the post argues, don't fail to review because they are lazy; they fail because the change is too large to hold in working memory. The PR then sits, the feedback quality drops, and the feature lands under-reviewed. According to the post, this is the default behaviour of agents "largely trained on how code has traditionally been written over the years," and it is the problem GitHub is trying to solve.
Decomposition as a first-class workflow
The proposed fix is decomposition into a stack. The article specifies four layers for the shopping-assistant example: a typed catalog with seed data and a data-access module (L1), a validated /api/products/search endpoint (L2), chat logic that calls that endpoint (L3), and the grounded UI with citation cards and states (L4). Each layer becomes its own PR, and each is evaluated against a defined "stack base" rather than against the previous layer's transient state. This, the author notes, lets CI checks and merge rules run consistently across the whole stack. Crucially, the work is no longer one audience's problem: data is reviewed by a data owner, UX by a UI owner, and so on. The implementation ships as a gh stack CLI extension plus a gh-stack skill that can be installed into agents via gh skill install or npx skills add, suggesting GitHub is positioning the workflow as something agents must be explicitly taught, not something they will infer.
Why this matters beyond the demo
The deeper claim is that coding agents do not remove the structural choice of how to ship a feature — they amplify it. Citing Gartner, the post projects a 50% productivity gain across SDLC stages by 2028, but frames that gain as conditional on teams having a sane way to land the resulting code. Stacked pull requests are GitHub's bet that the right primitive is platform-level, not a third-party tool layered on top. By building the feature directly into the pull request UI and the gh CLI, and by shipping an accompanying agent skill, GitHub is nudging the ecosystem toward a default where large AI-generated diffs are decomposed before they ever reach a human reviewer. Whether teams adopt the discipline is another question, but the platform is now making the easy path the structured one.
Key points
- GitHub is promoting stacked pull requests as the default way to land large AI-generated changes, evaluated against a defined stack base rather than a moving target.
- The pattern decomposes work by concern — data, API, wiring, UI — so each layer can be assigned a different reviewer audience and a dedicated coding agent.
- The feature is implemented in the pull request UI and exposed as a `gh stack` CLI extension, keeping the workflow native to GitHub rather than a third-party tool.
- A companion `gh-stack` skill (installable via `gh skill install` or `npx skills add`) is meant to teach coding agents how to create and manage stacks themselves.
- The post frames the problem as one AI agents amplify rather than solve: agents trained on traditional code patterns default to one big diff, which is what stacks are designed to break up.