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

**URL:** <https://forum.cursor.com/t/launch-agents-from-pr-comments-including-closed-prs-to-create-a-new-branch-and-fix-follow-up-issues/165956>\
**Category:** Feature Requests\
**Tags:** github, automations, cloud-agents\
**Created:** [July 16, 2026, 7:52pm UTC](https://forum.cursor.com/t/launch-agents-from-pr-comments-including-closed-prs-to-create-a-new-branch-and-fix-follow-up-issues/165956 "2026-07-16T19:52:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luisa](https://avatars.discourse-cdn.com/v4/letter/l/76d3ee/32.png) [@Luisa](https://forum.cursor.com/u/Luisa)\
**Post date:** [July 16, 2026, 7:52pm UTC](https://forum.cursor.com/t/launch-agents-from-pr-comments-including-closed-prs-to-create-a-new-branch-and-fix-follow-up-issues/165956/1 "2026-07-16T19:52:39Z")

</div>

### 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

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [July 17, 2026, 7:05am UTC](https://forum.cursor.com/t/launch-agents-from-pr-comments-including-closed-prs-to-create-a-new-branch-and-fix-follow-up-issues/165956/5 "2026-07-17T07:05:02Z")

</div>

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](https://cursor.com/docs/integrations/github)

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.

---

<div class="post-metadata">

**Author:** ![Luisa](https://avatars.discourse-cdn.com/v4/letter/l/76d3ee/32.png) [@Luisa](https://forum.cursor.com/u/Luisa)\
**Post date:** [July 17, 2026, 10:53pm UTC](https://forum.cursor.com/t/launch-agents-from-pr-comments-including-closed-prs-to-create-a-new-branch-and-fix-follow-up-issues/165956/6 "2026-07-17T22:53:35Z")

</div>

@deanrie amazing! You made my day!

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [July 20, 2026, 11:06am UTC](https://forum.cursor.com/t/launch-agents-from-pr-comments-including-closed-prs-to-create-a-new-branch-and-fix-follow-up-issues/165956/7 "2026-07-20T11:06:13Z")

</div>

Closed on July 20, 2026, 11:06am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
