Launch agents from PR comments (including closed PRs) to create a new branch and fix follow-up issues

Feature request for product/service

Cloud Agent (GitHub, Slack, Linear,…)

Describe the request

I’d like the ability to tag a Cursor agent directly in a GitHub PR comment — including on closed/merged PRs — and have it automatically spin up, understand the context, create a new branch, apply the fix, and open a new PR.

Real-world example: After a PR is merged, I notice in a comment thread that a field is being read from the wrong place (e.g., req.query instead of req.body). Right now I have to manually re-describe the issue inside Cursor, reconstruct all the context, and then ask the agent to branch and fix it. This breaks flow.

What I want:

  • Tag @cursor-agent in any PR comment (open or closed) with a short instruction like: “fix this: read from req.body.userId, validate as string, create a new branch + PR”
  • The agent reads the comment, the diff, and the current repo state
  • It creates a new branch (e.g. fix/field-source-userId), applies the fix, runs tests, and opens a new PR referencing the original comment

Why it matters:

  • Issues are often caught late, during review or after merge
  • Re-describing bugs inside Cursor wastes time and loses context
  • This turns PR comments into actionable tasks without switching tools

Possible implementation:

  • A “Send to Agent” button next to each PR comment via GitHub integration / MCP
  • Support for @cursor-agent mention syntax in PR comments
  • Configurable branch naming, base branch, and required checks before pushing

Hey, good news, this already works today.

In a comment on a GitHub PR or issue, mention @cursor and give an instruction, for example:

@cursor read userId from req.body instead of req.query, validate as string, create a new branch and open a fix PR

Cursor will spin up a cloud agent that reads the PR context diff, comment thread, and CI, then opens a PR with the fix. This should also work on merged or closed PRs.

A couple of notes:

  • You need the GitHub integration connected for the repo: Integrations dashboard > Connect GitHub.
  • If the agent doesn’t pick up your comment, try putting @cursor at the start of the message, it’s sometimes more reliable.

More details on setup: GitHub | Cursor Docs

The part about a custom branch name, base branch, and required checks before push is closer to the Automations workflow. Let me know if you want to dig into that.

@deanrie amazing! You made my day!