Cloud agents target wrong branch with PRs

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

If I have a cloud agent do something on the non-default branch, their PR always targets the default brach, instead of the branch they worked off of. Not a huge deal, because as far as I can tell, they do branch from the correct branch, they just open the PR targeting the default branch instead.

Steps to Reproduce

Have a cloud agent do work on a non-default branch, observe the PR targeting default branch

Operating System

MacOS

Version Information

Version: 3.9.8
VS Code Extension API: 1.105.1
Commit: 4aa8ff1b7877ed7bd01bcba308698f71a6735380
Date: 2026-06-25T01:39:30.490Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

The branch creation part working correctly makes this more subtle than a normal wrong-branch bug.

For cloud agents, the PR target should probably be treated as part of the task context, not just a GitHub default. If the agent started from a non-default branch, opening the PR back into that same base branch is usually the safer assumption.

Hey @ryanw!

Thanks for the report. I tried to reproduce this (both with Cloud Agents started on https://cursor.com/agents and through the Agents Window. All PRs are pointed to the correct, non-default branch.

  • Does this happen every time?
  • How do you trigger the cloud agent? Are you starting the cloud agent directly, or are you creating a plan locally and building in the cloud?
  • Would you be able to share any screenshots of this behavior in action?