English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

GitHub Copilot Links Stacked Sessions and Stacked Pull Requests: The Next Default Agent Coding Workflow

Forum topic · 小凯 · 2026-07-31

Summary

On July 30, 2026, GitHub introduced Stacked Sessions and Stacked Pull Requests in the Copilot App, chaining AI coding sessions and pull requests into sequential workflows that land cleanly on the main branch. Stacked Sessions let each new task build on the previous session's output, while Stacked PRs automatically generate a corresponding chain of pull requests. GitHub developer advocate Cassidy Williams demonstrated the feature by modernizing a 2014 React project, migrating from Less to Tailwind and replacing react-bootstrap, using Claude Opus 4.8 with GPT-5.5 review. The workflow addresses three chronic problems in AI-assisted coding: avoiding giant monolithic PRs, preserving session context across tasks, and auto-syncing base branches as PRs merge. This analysis covers the feature details, the real-world case study, caveats (developers must explicitly prompt for separate PRs), and what this means for competition with Cursor, Codex CLI, and Claude Code.

On July 30, 2026, GitHub announced two new capabilities in the Copilot App on its official blog: Stacked Sessions and Stacked Pull Requests. This is not simple multi-session support — GitHub applied a chained abstraction at both the session and PR layers: one session after another, one PR after another, until the work lands on the main branch.

What This Actually Is

First, the two concepts:

  • Stacked Sessions: Open a series of tasks in the same repository, where each session builds on the previous session's output. Plan mode produces a plan, and each session is an independently executable unit.
  • Stacked PRs: A chain of pull requests where each PR targets the branch of the previous PR, forming an ordered chain that ultimately lands on main.
  • Previously these two things were separate: running long task chains with Copilot in the IDE required manually merging context, and maintaining PR chains required manually managing base branches. GitHub has now connected them — Stacked Sessions automatically produce corresponding Stacked PRs.

    Cassidy Williams' Real-World Modernization

    GitHub's head of developer relations, Cassidy Williams, published a first-person account of using these features to modernize her personal project from 2014.

    The project originally used React 15, Less, and react-bootstrap. She had previously attempted manual modernization but gave up because it was "too big and messy to extract value from." This time she dropped the repo into the Copilot App:

    1. Step one: In Plan mode, she gave Claude Opus 4.8 a prompt to fully remove Less, consider Tailwind, and clean up accessibility and responsiveness. The model produced a plan, then GPT-5.5 performed a Rubber Duck review, with a few back-and-forth rounds to finalize it. 2. Step two: The workflow got stuck because she accidentally branched from the old dev branch instead of main. She asked Copilot to switch branches and redo the work — her earlier planning wasn't wasted; the system migrated her styling decisions intact to the dev branch. 3. Step three: Mid-migration, she discovered react-bootstrap itself referenced outdated findDOMNode and componentWillReceiveProps. In Plan mode she asked whether to remove react-bootstrap or upgrade it; the model recommended a full library replacement. 4. Step four (the key step): She didn't want to mix the react-bootstrap replacement into the same large PR — an anti-pattern she explicitly called "scope creep." With a single prompt, she had Copilot:

  • Submit the existing work as a PR;
  • Open a new stacked session on top of that PR, dedicated to the react-bootstrap replacement, inheriting prior context;
  • Automatically generate a corresponding stacked PR targeting the original PR's branch.
  • Her screen ended up showing three stacked nodes simultaneously: the first failed PR, the successful PR, and a draft PR for the react-bootstrap replacement. As she wrote in the blog: "THIS WAS SO COOL. Stacked sessions *and* stacked pull requests? Is this the future? YES."

    Why This Design Matters

    From a workflow perspective, stacked sessions + stacked PRs solve three problems at once:

  • Avoiding giant PRs: Developers resist reviewing single PRs with thousands of lines, and AI coding makes such PRs especially easy to generate. Stacking forces PRs to be sliced along natural boundaries.
  • Preserving session context: Each session used to be an island, requiring a fresh explanation of "what I want to do." Stacked sessions inherit context automatically.
  • Automatic PR chain syncing: Base branch relationships don't need manual maintenance — merging one PR automatically advances the next PR's base.
  • In terms of the AI coding tool competitive landscape in the second half of 2026, this moves Copilot from "editor plugin" toward "PR collaboration platform." Cursor, Codex CLI, and Claude Code are still operating at the "single session" level, while GitHub has added an AI-native abstraction on top of the PR — a collaboration unit developers already know.

    A Few Details

  • Coverage: The announcement applies to all Copilot plan tiers, but stacked PRs were already an existing GitHub platform feature; the new addition is stacked sessions in the Copilot App.
  • Models: Cassidy used Claude Opus 4.8 with GPT-5.5 Rubber Duck review, showing stacked sessions aren't tied to a single model and can be mixed.
  • Entry point: In the Copilot App's main interface, after Plan mode produces a plan, the system automatically creates session nodes.
  • Risk: Developers must explicitly ask for subsequent work in separate PRs, otherwise the model tends to cram all changes into one. There's no default behavior — prompt engineering is required.
  • Practical Assessment

    Cassidy's case is a small personal project, but the two anti-patterns she identified — giant PRs and lost session context — are pitfalls every AI coding team hits. Stacked sessions + stacked PRs aren't the only solution (tools like Graphite and Spruce build PR chains using git worktrees), but GitHub's advantage is building it into the official repository abstraction without third-party integrations.

    My take: this workflow is a significant paradigm shift for "AI coding + long-running tasks." The next thing to watch is whether Cursor, Codex, and Claude Code follow suit. If everyone adds stacking abstractions within six months, it will signal that AI coding tool competition in 2026 H2 shifts from "which model can run longer tasks" to "which workflow can split long tasks for human review."

    References:

  • GitHub official blog: https://github.blog/ai-and-ml/github-copilot/stacked-sessions-and-pull-requests-in-the-github-copilot-app
  • Copilot App overview: https://github.com/features/ai/github-app
  • Stacked PR docs: https://gh.io/stacks

Tags

#github-copilot#stacked-pull-requests#stacked-sessions#ai-coding#developer-workflow#pull-requests#agentic-coding

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178503831