How to fix "Stacked PRs are not enabled for this repository"
By Flavio Copes
Stacked PRs are not enabled for this repository is a gh stack warning with no setting to flip. Check your gh account and repo, or open regular PRs.
gh stack prints “Stacked PRs are not enabled for this repository” when GitHub’s Stacks API answers 404 Not Found for your repository. There’s no setting to turn on, because GitHub’s docs say stacked PRs need no setup or enablement. Start with the account gh is logged in with, since GitHub also answers 404 when that account can’t see the repository. Run gh auth status, switch with gh auth switch if needed, and run gh stack submit again.
If you need the pull requests right now, answer y when gh stack submit offers to create regular PRs. You can link them into a stack later.
The full workflow is in my practical guide to gh stack. Here we only deal with this warning.
Where does the warning come from?
You usually meet it the first time you submit a stack:
Checking stack state...
⚠ Stacked PRs are not enabled for this repository
? Would you still like to create regular PRs? (y/N)
gh stack link, gh stack checkout and gh stack merge can print the same line.
Behind the scenes, the extension calls GET /repos/{owner}/{repo}/stacks. A 404 from that endpoint can mean stacks aren’t available for the repository. It can also mean your token can’t read the repository at all. GitHub returns 404 instead of 403 for private repositories you can’t access, so it never confirms they exist. The two responses look identical, and the extension prints the same warning for both.
gh stack submit is even broader. Any failure of that first call, a network error included, shows this warning.
When there’s no terminal, like in a CI job or a coding agent session, there’s no prompt either. The command stops before pushing anything and exits with code 9.
Is there a setting to enable stacked PRs?
No. GitHub’s guide to rolling out stacked PRs says they “require no setup or enablement”. There’s no toggle in the repository settings or in the organization settings, and an admin can’t flip one for you.
Stacked PRs entered public preview on July 30, 2026, and GitHub announced a rollout to all repositories over the following days.
How do I check whether stacks work for my repository?
The quickest test calls the same endpoint the extension uses. Run it from inside your repository, and gh fills in the owner and the repository name:
gh api 'repos/{owner}/{repo}/stacks'
A JSON array means stacks work for this account and this repository. On a repository without stacks yet, you get an empty [].
If you get gh: Not Found (HTTP 404), the API won’t give you stacks for that repository. The next sections go through the causes.
Is gh using the right account?
This one is easy to miss when you have a personal and a work account logged in on the same machine.
gh auth status
It lists every account for each host and shows Active account: true under the one gh uses. If the active account can’t access the repository, switch:
gh auth switch
With two accounts on github.com it switches straight to the other one. With more, it asks you, or you can pass the account name with --user.
Also look at the text in parentheses after each account name. It tells you where the token comes from. If it says GH_TOKEN or GITHUB_TOKEN, an environment variable takes precedence over your saved login, and gh stack uses that token too. Unset the variable, or give that token access to the repository.
Run the gh api check again. Once it returns an array, run gh stack submit and the stack gets created.
Is gh stack asking about the right repository?
gh stack takes the repository from the GH_REPO environment variable when it’s set. Otherwise it reads your Git remotes, preferring one named upstream, then github, then origin.
Run git remote -v if something looks off, especially in a fork. Stacked PRs need every branch in the same repository, so a stack going from your fork into the original project isn’t supported.
What if the repository is readable and stacks still 404?
Check where the repository is hosted. The stacked PR docs cover GitHub.com and GitHub Enterprise Cloud, and as of September 2026 there’s no GitHub Enterprise Server version of those pages.
If your repository is on GitHub.com or Enterprise Cloud, gh stack feedback opens a discussion in the gh-stack repository where you can report it.
How do I open the pull requests anyway?
The simplest workaround is built into gh stack submit. Answer y at the prompt, and it pushes every branch and opens one pull request per branch, each based on the branch below it. The only step it skips is linking them into a stack on GitHub.
Each pull request still shows only its own layer. You lose the stack map and the one-click merge of the whole chain. Checks and branch rules that target main may also run only on the bottom pull request, because the others target a feature branch.
When stacks work for the repository, run gh stack submit again. It links the open pull requests and prints a line like ✓ Stack created on GitHub with 3 PRs (stack #12). GitHub also notices open pull requests whose branches line up and shows a banner offering to turn them into a stack.
You can build the same chain without the extension. Push the branches, then create each pull request with --base set to the branch below it:
git push -u origin user-model search-api search-ui
gh pr create --base main --head user-model --fill
gh pr create --base user-model --head search-api --fill
gh pr create --base search-api --head search-ui --fill
--fill takes the title and the description from your commits.
Later, pass the pull request numbers to gh stack link, from bottom to top, to turn them into a stack:
gh stack link 41 42 43Want me to talk about your product? You can sponsor this site.