How pstack stacks agent-built pull requests with gh or Origin

pstack's autopilot-stack lets workers build PRs in parallel while one coordinator owns the linear stack, using gh or Origin without requiring Graphite.

pstack is Lauren Tan's MIT-licensed Cursor plugin with 23 playbooks. Its autopilot-stack playbook lets one Cursor cloud agent own each pull request's build and verification, while a root coordinator alone changes stack topology through GitHub CLI gh or Cursor's Origin CLI. The playbook says to never require Graphite (gt) and never submit or register the chain through gt.

pstack's 23 playbooks

  • The official pstack repository lists 23 playbooks, including Investigation, Feature, Shipping, Autopilot-full, Autopilot-stack, and Opening a PR.
  • Lauren Tan's X post on 2026-09-21 announces a 38-minute video about shipping 2,500 PRs to production.
  • autopilot-full is for independent pull requests when landing authority is granted. autopilot-stack is for coupled or ordered work when the operator keeps landing authority.

pstack's autopilot-stack

The playbook separates code ownership from pull request topology.

  1. Owners build in isolation. One Cursor cloud agent owns one pull request from build through verification. Owners parallelize when the work is self-contained, push only their own branches, and report the branch tip, current base, and intended parent. The root coordinator owns the queue, not the owner's code.
  2. The root writes the topology. To append a verified pull request, the root fetches the intended parent, rebases the child onto that exact tip, checks ls-remote, pushes with --force-with-lease, and sets the pull request base to the parent branch. The root creates or retargets pull requests with gh or Origin:

`bash

gh pr create --base <parent-branch>

gh pr edit <pr> --base <parent-branch>

`

Only the root pull request targets trunk. Owners do not merge, arm auto-merge, or close pull requests. The playbook also says never to submit or register the chain through gt.

  1. The root rechecks drift. When trunk advances, the root rebases the chain from the bottom up. A rebase rewrites commit SHAs and voids verdicts attached to the old SHAs. The root applies the patch-id rule from the shipping playbook, then reruns mergeability and CI after every rewritten push, even when the patch ID is unchanged.
  2. The root audits liveness. The coordinator arms /loop 1h, rereads autopilot-stack.md from origin/main, and counts commits, pushes, pull request or check deltas, and store reports as progress. A lane that passes its expected runtime without a side effect is treated as stuck and replaced.
  3. The operator lands the result. autopilot-stack delivers one linear chain of verified pull requests for bottom-up review. The operator reviews and lands it. The agent stack stops before landing.

Stacked PR tools beside pstack

Tool

Where stack operations live

Pull request mechanism

pstack autopilot-stack

Root coordinator plus isolated owner branches

gh pr create/edit --base or origin pr ...

Graphite gt

Graphite's initialized repository and CLI

gt submit creates or updates a branch stack

ejoffe/spr

Commits on one branch

git spr update turns each commit into a pull request

Sapling sl

Local commit data

sl pr submit creates or updates GitHub pull requests

git-branchless

Local commit graph

git sync and git restack repair and rebase the graph

Graphite, spr, Sapling, and git-branchless each document a local command workflow for stack operations. pstack puts that control in a coordinator protocol. Owners write code and report their branch state. One root agent changes the pull request bases and rebases the chain. The practical inference is that pstack can keep topology decisions in one coordinator while builders work independently. That is a different control point, not a claim that the other tools are unusable with agents.

Scope after the 2026-10-06 freshness check

A freshness search on 2026-10-06 found mdsmithaustin/pstack, a separate repository that describes itself as a CLI-agnostic port of Cursor's pstack. This post covers the official cursor/plugins implementation, so that port does not change the commands or ownership rules described here.

Sources

Last verified: 2026-10-06.

Spotted an outdated or wrong claim? Agents can report it with evidence throughPOST /api/feedback; an editor checks every report. See llms.txt for the agent API.