Product @github leading Stacked PRs 🥞 Previously @rockerbox, @eventable Proud @UCBerkeley dropout

New York, NY
Joined February 2012
Sameen Karim retweeted
Agents don’t just help build features. They can help try to break them, too. In our latest GitHub Podcast episode, Sameen Karim takes us behind the scenes on building stacked PRs. Listen to it wherever you get your podcasts or at youtu.be/sbHoDdAalMI?si=purN…
32
13
104
28,600
One of the key design decisions we made with stacked PRs was reusing the existing PR model. It definitely came with some drawbacks, but it’s what made it possible to ship the feature without needing to rewrite all of the core plumbing (and we still had to update a lot!) More on how we built stacks on the latest episode of the @github podcast: youtu.be/sbHoDdAalMI
1
1
342
Sameen Karim retweeted
stacked prs @github behind the scenes. the merge box is way more complex than you think, we touched code that hadn't been updated in a decade, and we set a swarm of agents loose trying to break it 🤯 full episode: youtu.be/sbHoDdAalMI
1
6
17
2,500
To solve this, we now record the merge-base SHA of the entire stack alongside each review. This is the common ancestor of the reviewed head and the stack's base branch, giving us a reference point for checking the whole stack up to that PR
1
6
630
We simulate merging the previously approved head with the new stack merge-base, then compare that result's git tree with the rebased head's tree. If they match and the review's recorded merge-base is still valid, we promote the approval to new head commit
1
4
527
Approvals are now retained for Stacked PRs after stack rebases ✅ Whether you use the "Rebase stack" button or partially merge a stack, as long as the diff doesn't change, PR approvals will be kept even if you have "dismiss stale approvals" turned on
16
31
9
410
43,923
The challenge was telling the difference between replaying the same reviewed changes on a new base vs. actual changes that have been introduced that need another review. In a stack, that means accounting for the PRs below, too
1
4
822
PR approvals are tied to commit IDs and since a rebase/force-push rewrites those, it would previously always result in reviews being dismissed. We do have a system for "promoting" approvals but historically it only worked with merge commits
1
4
1,127
Sameen Karim retweeted
stacked PRs be like
1
2
123
So much exciting work happening in git systems right now! Moving to blob-storage and decoupling compute while simultaneously unwinding mountains of tech debt and unnecessary dependencies. 35x higher write throughput ⚡️
Git activity more than doubled between September 2025 and August 2026, reaching 473.3B events per month. We’re rebuilding our Git infrastructure while GitHub keeps running, creating a foundation for agent-scale software development.
1
9
571
gh stack CLI now supports git worktrees 🥞 You can manage stacks where each branch is in a separate worktree, while still taking advantages of things like cascading stack rebases github.com/github/gh-stack/r…
24
44
6
333
40,551
Some of the largest monorepos are now using this API for their agent-scale workloads - it's already accounting for ~1% of programmatic merges with a 34% lower error rate Platforms like @cognition and @trunkio have also updated their integrations to leverage the async merge API
1
12
2,034