You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh pr create reports a generic permissions error when the repository’s open-PR limit is reached #14874
When a repository's concurrent open pull request limit prevents submission, gh pr create returns a generic permissions error without identifying the limit.
The GitHub website explains the same failure explicitly:
You've reached the open pull request limit for this repository.
Users without write access can have up to 5 pull requests open at a time.
This makes the CLI failure look like an authentication or token-permissions problem rather than a repository contribution limit.
Use an account without write access to a repository that has a concurrent open-PR limit.
Reach or exceed that limit.
Push a new branch to an account-owned fork.
Attempt to open a non-draft PR using gh pr create.
Compare the error with the repository's web PR-creation page.
Expected vs actual behavior
Expected: an error explaining that the repository's open-PR limit has been reached, rather than implying that authentication or token permissions are incorrect. Include the configured limit if available.
Actual:
pull request create failed: GraphQL: will-lynas does not have the correct permissions to execute `CreatePullRequest` (createPullRequest)
The website explicitly identifies the five-open-PR limit.
Authentication succeeded, pushing to the fork succeeded, and GitHub's compare endpoint resolved the branch correctly. No PR was created.
A separate REST API attempt to create the same PR returned HTTP 404 with {"message":"Not Found"}. This suggests that the underlying API also obscures the reason; a clearer diagnostic may require an API-side change.
These are related contributor reports, not evidence that every permissions error has this cause. In my own case, the web PR-creation page explicitly confirmed the repository's five-open-PR limit. The issue here is the CLI/API diagnostic, not a request to bypass the repository's policy.
Thanks for the detailed report and investigation. I did not find an existing issue reporting this specific failure mode, so this looks like a new report rather than a duplicate.
Looking at the code, gh pr create wraps whatever GraphQL error createPullRequest returns with a generic "pull request create failed: %w" prefix and otherwise passes the raw GraphQL message through unchanged (see create.go lines 1137-1146 at 8553724d157cd73dd42c937c79c51787f86e814a). There's no special-casing that inspects the GraphQL error type/message to detect the open-pull-request-limit case and produce a clearer message — so the misleading "does not have the correct permissions" text is exactly what GitHub's GraphQL API returned, re-surfaced as-is. This is consistent with the reporter's hypothesis that the underlying API itself doesn't distinguish this failure reason in its error payload (the REST 404 response supports that too), which would mean a real fix likely needs a clearer signal from the GraphQL/REST API before the CLI can special-case and surface a better message.
Given that, I'm suggesting bug (the CLI's error message is misleading relative to the actual cause, even if root-caused upstream) and gh-pr as the affected command area, plus a tentative priority-3 since a workaround exists (checking the PR-creation page on github.com) and it affects a specific scenario rather than core functionality broadly. A maintainer may want to confirm with GitHub's API team whether the GraphQL error can be made more specific before deciding how (or whether) the CLI can reliably detect and special-case this.
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the
help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
Activity
will-lynas commentedon Oct 30, 2026
Additional reports from the affected repository:
CreatePullRequestpermissions error and REST 404, despite working authentication, fork pushes and issue creation. Its investigation connects the failure to the open-PR cap.GitHub documents the cap and contributor exemptions here:
https://docs.github.com/en/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository#limiting-concurrent-open-pull-requests-for-users-without-write-access
These are related contributor reports, not evidence that every permissions error has this cause. In my own case, the web PR-creation page explicitly confirmed the repository's five-open-PR limit. The issue here is the CLI/API diagnostic, not a request to bypass the repository's policy.
🤖 Generated with AI
cli-triage commentedon Oct 30, 2026
Thanks for the detailed report and investigation. I did not find an existing issue reporting this specific failure mode, so this looks like a new report rather than a duplicate.
Looking at the code,
gh pr createwraps whatever GraphQL errorcreatePullRequestreturns with a generic"pull request create failed: %w"prefix and otherwise passes the raw GraphQL message through unchanged (seecreate.golines 1137-1146 at8553724d157cd73dd42c937c79c51787f86e814a). There's no special-casing that inspects the GraphQL error type/message to detect the open-pull-request-limit case and produce a clearer message — so the misleading "does not have the correct permissions" text is exactly what GitHub's GraphQL API returned, re-surfaced as-is. This is consistent with the reporter's hypothesis that the underlying API itself doesn't distinguish this failure reason in its error payload (the REST 404 response supports that too), which would mean a real fix likely needs a clearer signal from the GraphQL/REST API before the CLI can special-case and surface a better message.Given that, I'm suggesting
bug(the CLI's error message is misleading relative to the actual cause, even if root-caused upstream) andgh-pras the affected command area, plus a tentativepriority-3since a workaround exists (checking the PR-creation page on github.com) and it affects a specific scenario rather than core functionality broadly. A maintainer may want to confirm with GitHub's API team whether the GraphQL error can be made more specific before deciding how (or whether) the CLI can reliably detect and special-case this.github-actions commentedon Oct 30, 2026
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.