Tell your coding agent to deliver its work as a stack: a series of small pull requests, each building on the one below, instead of one 2,000-line change. Greg Foster's data says longer diffs get fewer review comments per line, and he argues that faster code generation has made review the growing bottleneck.
Greg Foster founded Graphite, which builds code review and stacking tools. In a September 2025 episode he laid out why the bottleneck moved and how stacking helps.
Why is review the bottleneck now?
Because AI sped up the inner loop, writing code, while the outer loop stayed human: review, CI, merge queues, deploys and watching production. Foster said he thinks Facebook was quoted as doubling internal code changes per engineer over the past year, with another doubling expected soon, and that Graphite's own data shows code-change volume per engineer "strictly up into the right." A team that merged 20 changes a day might now merge 50, or 100 with bots in the mix, with more merge conflicts to match.
Trust dropped at the same time. Foster used to assume a teammate wrote the change he was reviewing:
Now it's like, okay, Conor, I'm not sure you wrote this. I, you might've written it. You might've just like held tab down while like staring at your iPhone.
Greg Foster, founder of Graphite, on Chain of Thought ep 40
The reviewer may be the first human to read the code at all.
Why do small PRs get better reviews?
Reviewers stop reading long diffs. Foster pointed to a study he thinks Google ran, and said Graphite's data shows the same pattern: the longer the change, the fewer comments per line.
You put up a 10 line PR, you're going get like five comments on it.
Greg Foster, founder of Graphite, on Chain of Thought ep 40
A giant PR gets an LGTM. So the goal is to keep each reviewable unit small even when the agent produces a lot of code. Stacking, a practice Foster attributes to Facebook's engineering culture, does that: each small change sits on top of the previous one, and each can be reviewed, tested and merged in order.
How do you get an agent to produce a stack?
Ask for it, and give it a plan first. Foster's observation is that agents take to it well:
AI really likes it. It's actually, when you actually start getting these coding agents to stack their code changes and create many small ones, they start applying chain of thought to those stacks.
Greg Foster, founder of Graphite, on Chain of Thought ep 40
He described agents naturally splitting work into the function, then the unit test, then the endpoint on top. The engineers he sees getting the best results start with a markdown design doc worked out with the agent, then tell it to read that doc before writing code.
A prompt pattern that follows from this:
- Write or co-write a short design doc: the interfaces, the order of dependencies, what's out of scope.
- Ask for the change as a stack, with a line budget per PR and one concern per PR.
- Require each PR to pass CI on its own.
- Review the bottom of the stack while the agent works on the next layer, and stop the stack if a layer fails.
A minimal sketch to adapt. diff_stats is a hypothetical helper returning lines added and removed for a hunk.
def plan_stack(hunks, dependency_order, max_lines=200): """hunks: dicts with a 'file' key; dependency_order: files, lowest layer first.""" by_file = {} for h in hunks: by_file.setdefault(h["file"], []).append(h) stack, current, size = [], [], 0 for f in dependency_order: for h in by_file.pop(f, []): added, removed = diff_stats(h) if added + removed > max_lines: raise ValueError(f"hunk in {f} exceeds the budget; ask the agent to split it") if current and size + added + removed > max_lines: stack.append(current) current, size = [], 0 current.append(h) size += added + removed if by_file: raise ValueError(f"files missing from dependency order: {sorted(by_file)}") if current: stack.append(current) return stack This is a batching heuristic: it keeps each PR under a size budget, but it can't tell whether a layer compiles or passes CI on its own, so run CI on every layer. Foster's examples point smaller than 200 lines: the 10-line PR that gets real feedback, versus the 2,000- or 3,000-line PRs he doesn't want agents opening.
What should a reviewer check on each layer?
- Does this PR do only what its place in the stack says, with no refactor pulled in from later?
- Does it depend only on PRs below it?
- Does CI pass for this diff alone?
- Which design doc or prompt produced it?
FAQ
What are the three waves of AI coding Foster describes?
Tab-complete in the editor, a "director mode" where you send the model on small missions from a sidebar or terminal, and background agents you ping on Slack or GitHub that return a pull request later. He guessed background agents could handle maybe 10% of PRs, with that share inching up as models improve.
Is stacking only for big companies?
Foster said it's spreading, naming engineers at Datadog, Vercel, Notion and Figma. The reasoning carries to any team merging into a shared trunk: small diffs get better review and more granular CI. He saw open source as harder, since a maintainer reviewing a stranger's change wants the complete working solution.
Can AI review the stack instead of a person?
AI reviewers help catch issues, but the point of the episode is that human review got more important, not less, because nobody may have read the code before you.
Takeaway
- Ask agents for a stack of small PRs with a line budget, not one large PR.
- Start from a design doc the agent reads before coding.
- Keep one concern per PR, with CI passing for each.
- Review from the bottom of the stack up, and stop when a layer fails.
The full conversation, with the transcript, is on Chain of Thought.
Subscribe to the Chain of Thought newsletter for new episodes and write-ups like this one.
Drafted with AI assistance from the episode transcripts.


