Cloud Agent not able to load GitHub issue

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

If I kick off a cloud agent with the instruction “Work on GitHub Issue #5872” it fails to read it and starts hallucinating.

I see it ran:

gh issue view 5872 --repo MyOrg/Myrepo

But that fails with:

GraphQL: Could not resolve to an issue or pull request with the number of 5872. (repository.issue)

It then tried:

gh issue list --repo MyOrg/Myrepo --limit 20 2>&1 || true

Which fails with

GraphQL: Resource not accessible by integration (repository.issues)

After that it gives up and starts inventing things to work on.

Why isn’t it able to read GitHub? It has access to my repo obviously…
I tried reconnecting my GitHub integration but that didn’t help.

Steps to Reproduce

  1. Setup a GitHub integration
  2. Create a GitHub Issue
  3. Ask Cursor’s cloud agent (via web) to work on that issue, “Work on Github Issue #1

Expected Behavior

Cursor should load that issue via the GH CLI or API. Parse the contents of the issue title, body and comments – and use that to determine what to work on.

Operating System

MacOS

Version Information

https://cursor.com/agents/bc-474fdd7f-28d5-4fe5-83a3-91dc714e3d1e

For AI issues: which model did you use?

Opus 4.6

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, this is a known issue. The token the cloud agent gets in the sandbox environment doesn’t include access to GitHub Issues, so gh issue view and gh issue list fail with the error “Resource not accessible by integration”.

This is also why agents can’t create PRs directly. The token has limited permissions.

Related reports:

For now, the workaround is to paste the issue content directly into the agent prompt, like the title, description, and key comments, instead of asking it to fetch the issue by number.

1 Like

A post was merged into an existing topic: Pull request create failed: GraphQL: Resource not accessible by integration (createPullRequest)