FormingSkillclaude-codecodexgithub-copilotcursorpublished fresh until

gh-stack: how do I split a big agent task into small stacked PRs?

Summary Let agents open small PRs and handle feedback, CI and conflicts; keep separate read-only review and manual merging. This reported workflow uses gh-stack for dependent work; the packaged skill is untested.

Not for many merge conflicts on one branch; see rebase-many-conflicts-agent-resolve-mergiraf-lockfiles

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v0.2.1gh-stack CLI extension and agent skill
How you use itYou ask for it
What it can doinstalls software · writes files · network · runs shell
What's inside
ASkill · v0.2.1gh-stack CLI extension and agent skill
How you use it
You ask for it
What it can do
installs software · writes files · network · runs shell
What's inside

What this thread does

As of November 2026, GitHub stacked PRs are generally available. Do first: split dependent work into small layers, keeping the workflow's manual-merge guardrail below (GitHub, 6 October 2026).

The workflow

On 31 Aug 2026 @thymikee shared how he runs medium-to-large projects in the Codex desktop app: grill the idea, split it into 5 to 15 GitHub issues with clear dependencies, then have a coordinator agent hand one issue to each worker agent. Workers babysit their own PR (review feedback, CI, conflicts) but never auto-merge, and dependent work is stacked with gh-stack so each PR stays small. A separate read-only agent reviews active work adversarially. His point is that this needs no extra orchestration platform, only the agent app, GitHub and skills in the repo.

What gh-stack is

github/gh-stack (MIT) is GitHub's own CLI extension for stacked pull requests. A stack is an ordered chain of branches where each PR targets the branch below it, so reviewers see only that layer's diff. Merging a PR lands it together with every unmerged PR below it. The CLI creates branches, keeps them rebased (it turns on git rerere), pushes, and opens the linked PRs.

The repo also ships a gh-stack agent skill. It matters for agents because several gh stack commands open prompts or a full-screen TUI when run bare; the skill tells the agent to always use the non-interactive forms (view --json, submit --auto, merge <target> --yes, explicit branch names for init and add) and never gh pr merge on a stack.

When to use it

  • An agent's change is too big to review in one PR but splits into layers (schema, API, UI).
  • Several agents work on dependent issues and you want each PR reviewable on its own.

For independent changes, plain separate PRs are simpler.

Alternatives

  • Graphite, Jujutsu or Sapling for local stacking; GitHub's UI accepts stacks pushed from those tools too.
  • Plain branches with manual base changes.

Caveats (as of October 2026)

  • Stacked PRs became generally available on 6 October 2026.
  • GitHub's 6 October release allows authorized rule bypass for the lowest unmerged PR and announced auto-merge rolling out over the following weeks. Retain manual merging for the agent workflow described here; do not assume those platform capabilities authorize a worker to merge.
  • gh stack modify is TUI-only, so agents can't use it.
  • gh-stack rewrites history across worktrees during rebase; keep affected worktrees idle while it runs.
  • Unpinned installs check GitHub for updates in the background; set GH_STACK_NO_UPDATE_NOTIFIER=1 to turn that off.

gh-stack v0.3.0, 26 October 2026 makes push and submit atomic by default and lets sync/rebase follow a retargeted stack base. If the old base never merged, a new confirmation may interrupt an agent; inspect the proposed base change before opting into --accept-base-change. The TUI-only modify and worktree-idleness caveats above still apply.

Not for: many merge conflicts on one branch; see rebase-many-conflicts-agent-resolve-mergiraf-lockfiles

checked 2026-11-03

Started from a post by @thymikee, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in code review

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# gh-stack: how do I split a big agent task into small stacked PRs?
Summary: Let agents open small PRs and handle feedback, CI and conflicts; keep separate read-only review and manual merging. This reported workflow uses gh-stack for dependent work; the packaged skill is untested.

## Options
- A · gh-stack CLI extension and agent skill · early, no verdict yet · installs software · writes files · network · runs shell
Copy for agent
get the whatworks thread stacked-prs-gh-stack-for-agents and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread stacked-prs-gh-stack-for-agents

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · gh-stack CLI extension and agent skill

GitHub's gh stack CLI extension (v0.2.1) plus its gh-stack agent skill, which teaches the agent to create, push, submit, rebase and merge stacked PRs using only non-interactive commands.

Format
Skill
Source
github:github/gh-stack#skills/gh-stack
Pinned
v0.2.1 · 29a36d314be6
Content hash
29a36d314be66458
Audit
scan passed
Can do
installs software · writes files · network · runs shell
Works with
claude-code · codex · github-copilot · cursor
Check
gh-stack extension installed; gh-stack skill present in the project; rerere on, so conflict resolutions are reused across rebases
Author
@github
Kudos
0
Are you @github? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package gh-stack-skill before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package gh-stack-skill
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp