Cursor Slack Agent Loops on "Repository Access Denied" and Cannot Read Older Slack Messages

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m using Cursor’s background agent (Slack integration) to review Slack notifications and have them turn into actionable tasks. The agent consistently gets stuck in a loop where it attempts to work on a repo, returns repository access denied or says it doesn’t have access, then retries the same action repeatedly in a loop. This happens even after I’ve explicitly granted the Cursor GitHub app access to the repo. The agent does not pick up the new permissions during its run. Separately, there seems to be no way to have the agent read older/historical Slack messages - it only appears to see messages in the current session or very recent ones. If I want the agent to summarize patterns across older Slack notifications, it can’t do that.

Steps to Reproduce

  1. Set up a Slack background agent in Cursor with a Slack integration and GitHub repo access
  2. Send Slack notifications/messages that the agent should review
  3. Ask the agent to review the Slack notifications and take action on the repo
  4. The agent gets stuck in a loop: tries to access the repo, says repo access denied, retries again and again
  5. Even after granting repo access to the Cursor GitHub app and re-running, the same loop persists
  6. Attempt to have the agent read older Slack messages (beyond the current session) - it cannot access them

Expected Behavior

The background agent should:

  1. Refresh/recheck repo access permissions when they are updated, instead of getting stuck in a loop with stale permission state
  2. Provide a clear error message indicating exactly why it cannot access the repo (e.g., which scopes or org settings are missing) instead of silently looping
  3. Allow users to configure how far back in Slack history the agent should read - e.g., a setting to read the last 100 messages from a channel or a specific date range
  4. Not enter infinite retry loops when it hits a permission error - it should fail gracefully with actionable feedback

Operating System

MacOS

Version Information

Latest version (as of May 2026)

For AI issues: which model did you use?

Using background agent via Slack integration

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. Answering the two parts separately:

  1. Repository access denied loop. This looks a lot like a case from a nearby thread: Cloud automation cannot authenticate with GitHub despite permissions granted. What helped there was this sequence:
  • Open Settings → Integrations, disconnect GitHub
  • Go to Sign in to GitHub · GitHub and make sure the Cursor GitHub App has access to the right repo. If the repo is in an org, make sure an org admin allowed access
  • Reconnect GitHub in Cursor
  • Delete and recreate the automation in Slack. Important: don’t edit the existing one, recreate it so it picks up fresh auth

If the repo is in a GitHub org and you’re not an org admin, that’s a separate known case. Let me know and we can check repo visibility for non-admins.

Also agree that the agent going into a retry loop instead of failing with a clear error like “reconnect GitHub” is bad UX.

  1. Reading older Slack messages. Right now the agent’s Slack tool only reads recent messages in a channel or thread, with a limit up to 100, and no date range params or oldest. So it can’t summarize patterns from a week or a month of history yet. This is a known limitation.

If it’s still looping after reconnect and recreate, please share the automation run ID (or a link to the specific run) and whether the repo is personal or org-owned, and we’ll dig deeper.