Failed to Create a GitHub Pull Request from Cursor Web

I asked Cursor Web to perform some work and create a pull request, but it failed to create a PR on GitHub.

The error shown in the task log is as follows:

$ cd /workspace && gh pr create --title "feat(headsup): add Stud Hi-Lo (Stud 8 or Better) game type" --body "$(cat <<'EOF'

...

EOF

)" --base main 2>&1

pull request create failed: GraphQL: Resource not accessible by integration (createPullRequest)

Creating a branch and pushing commits worked without any issues.

I also checked the GitHub Integration configuration, and it appears that the Cursor app has permissions for all repositories. The permissions shown are:

Read access to actions, commit statuses, deployments, metadata, packages, and pages
Read and write access to checks, code, discussions, issues, pull requests, and workflows

Is there any additional configuration required to allow PR creation?

Also, are there others who are experiencing the same issue, or conversely, people for whom PR creation works successfully from Cursor Web?

Hey, thanks for the report.

It looks like this is a known issue the team is already tracking. To help investigate your specific case, could you share:

  1. Request ID: Open Cloud Agent at cursor.com/agents, click the menu (top right), and choose “Copy Request ID”
  2. Repo type: Is this a personal repo or an org repo?
  3. GitHub App install level: Is Cursor installed at the org level or on your personal account?

Also, please try reinstalling the GitHub app from GitHub Apps - Cursor · GitHub. Sometimes the app install can get corrupted or permissions can get out of sync.

Let me know if that helps!

@deanrie
Thank you for the information.
Let me try reinstall the integration because the time I set it up was long ago.

My information is below

  1. Request ID: bc-d6d53cc3-e651-4104-9f51-ea240a205781
  2. Repo type: personal repo
  3. GitHub App install level: Personal level
    • I allow this app can access to all my repos, I
      • Read access to actions, commit statuses, deployments, metadata, packages, and pages
      • Read and write access to checks, code, discussions, issues, pull requests, and workflows

Thank you

1 Like

I tried reinstalling the GitHub App integration. But agent can’t create PR yet even in new task.

https://cursor.com/agents?selectedBcId=bc-5009cbf2-1562-4037-af7c-39725c74bb8b

Thanks for the extra info and for testing with a reinstall.

This is a known issue, and the team is working on a fix. To help investigate your case, could you also share the browser console logs?

  • Open the browser console (F12) on cursor.com/agents
  • Start a new task and try to create a PR
  • When the PR creation error shows up, copy any errors from the console

This will help the engineers understand why the GitHub App still hits the “Resource not accessible by integration” error even after a reinstall. I’ll pass both of your Request IDs to the team for further investigation.

I’ve tried the above steps and saved log on my gitst.

( I hope no secrets information :p)

Thanks for the logs.

We looked into it and found a likely issue: GitHub requires the branch to exist on the remote before you can create a PR. In the logs, we see warnings like “Auto-commit: not on target branch, not pushing”, which suggests the branch may have been created locally but not pushed.

Could you please check whether the branch with your changes exists on GitHub? Go to your repo https://github.com/oppai/yomi and look at the branch list. Do you see the branch the agent created?

This will help the team figure out what’s going on, whether the agent isn’t pushing the branch or if it’s something else.

The logs is `bc-82be1722-c4ef-458a-913c-4b4fe7be1bfd` as request id.

Cursor log is below. It means “cursor pushed commit to new remote branch `cursor/agent-documentation-update-e88d`. But it was failed to create new PR. Please create below link.“

リモートブランチ cursor/agent-documentation-update-e88d にプッシュしました。 システム権限の都合により自動でのプルリクエスト作成に失敗しましたが、以下のリンクから作成できます。

プルリクエストを作成する

It is already merged (I merged after respond)

But it seem correct when I got the messages. Because I could create PR and merge this.

I put thinking log from cursor below when I got message about failed to create PR from cursor.

$ git add AGENTS.md
git commit -m "docs: update AGENTS.md with more detailed guidelines"
git push -u origin cursor/agent-documentation-update-e88d
gh pr create --title "docs: update AGENTS.md guidelines" --body "$(cat <<'EOF'
## Summary
AIエージェント向けのガイドライン `AGENTS.md` を更新し、より詳細な情報と明確な指示を追加しました。

## Changes
- **ディレクトリ構造**: 新規ファイル作成時の指針を追加。
- **コード品質**: `any` 型の回避と型安全性の維持を明記。
- **環境とツール**: リンター/フォーマッター情報を追加。
- **作業フロー**:
    - プランニング時に `docs/rule/` を参照するよう指示を追加。
    - 実装フェーズのガイドラインを追加。
    - コミットメッセージ形式として Conventional Commits を推奨。
- **ドキュメント管理**: ADR作成やドキュメント更新に関するセクションを追加。

## Purpose
AIエージェントが自律的に作業する際のコンテキスト理解を深め、成果物の品質を安定させるため。
EOF
)"
[cursor/agent-documentation-update-e88d 1b1f407] docs: update AGENTS.md with more detailed guidelines
 1 file changed, 20 insertions(+), 3 deletions(-)
remote: 
remote: Create a pull request for 'cursor/agent-documentation-update-e88d' on GitHub by visiting:        
remote:      https://github.com/oppai/yomi/pull/new/cursor/agent-documentation-update-e88d        
remote: 
To https://github.com/oppai/yomi
 * [new branch]      cursor/agent-documentation-update-e88d -> cursor/agent-documentation-update-e88d
branch 'cursor/agent-documentation-update-e88d' set up to track 'origin/cursor/agent-documentation-update-e88d'.
pull request create failed: GraphQL: Resource not accessible by integration (createPullRequest)

According to this, it seems push was success but creating pr is failed.

Thanks for the screenshot! That confirms the issue. The agent successfully pushes the branch, but creating the PR via the GitHub API fails.

I shared all the Request IDs and logs with the team. This is a known issue, and they’re already working on a fix.

For now, you can use a workaround. Create the PR manually using the link from the agent, like you did with PR #30.

I’ll let you know when the fix is out!

1 Like

@deanrie Hi, do you have any updates on this?

Hey, unfortunately there are no updates yet. This is a known issue, and the team is working on it.

As soon as there’s a fix, I’ll update the thread.

1 Like