Issue with autoBranch parameter and autoCreatePr functionality

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

Hi everyone,

I’ve been using the following request body for my API calls, and until recently, everything was working perfectly:

{
  "prompt": {
    "text": "Some Prompt"
  },
  "source": {
    "repository": "https://github.com/example/example-android",
    "ref": "develop"
  },
  "target": {
    "autoCreatePr": true,
    "branchName": "cscursor/CSA-2278"
  }
}

The Problem

Starting today, I noticed that the generated branches no longer match the branchName I provide. After checking the documentation (which didn’t mention any recent changes), I discovered a new parameter in the response: “autoBranch”: true.

Current Status

  • If I manually set “autoBranch”: false, the system respects my custom branchName again.
  • However, doing so breaks the PR functionality; the API no longer automatically creates a Pull Request even though autoCreatePr is set to true.

Questions

  • Is this inconsistency in the background agent a known bug or a permanent change in logic?
  • How can I use a custom branch name while still having the system automatically open a PR?

Any insights or workarounds from the team or the community would be greatly appreciated.

Steps to Reproduce

{
“prompt”: {
“text”: “Some Prompt”
},
“source”: {
“repository”: “https://github.com/example/example-android”,
“ref”: “develop”
},
“target”: {
“autoCreatePr”: true,
“branchName”: “cscursor/CSA-2278”
}

Expected Behavior

The API should respect the explicitly provided “branchName” in the request payload and simultaneously create a Pull Request when “autoCreatePr” is set to true.

Previously, this configuration allowed for custom branch naming while maintaining the automated PR workflow. Now, it seems I have to choose between a custom branch name (by setting autoBranch to false) or an automated PR (which ignores my branch name), but I cannot have both.

Operating System

Linux

Version Information

Cloud Agent Api

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

hi @enciyo and welcome to Cursor Forum.

The parameters work in the background agents API as follows:

  • autoBranch (default true):
    • true = creates a new branch
    • false = commits directly to an existing branch (like a PR head branch)
  • branchName:
    • sets a custom name for the new branch
    • only meaningful if autoBranch is true; ignored if false
  • autoCreatePR:
    • true = automatically creates a draft PR when done
    • false or omitted = no automatic PR creation

Combining autoCreatePR: true, branchName: “xxxx”, and autoBranch: false would be a logical conflict:

  • branchName is ignored because no new branch is created with autoBranch false
  • autoCreatePR: true makes sense if committing to an existing PR branch; it tries to create a PR or behaves differently if one exists

Solution would be:

New branch + auto PR: autoBranch true, autoCreatePR true, branchName “text”

Request.

{
  "prompt": {
    "text": "text"
  },
  "source": {
    "repository": "https://github.com/example",
    "ref": "develop"
  },
  "target": {
    "autoBranch": true,
    "autoCreatePr": true,
    "branchName": "cscursor/CSA-2278"
  },
  "webhook": {
    "url": "https:/...."
  }
}

Created Pr

Dashboard

Even if I send it this way, the branchName field is unfortunately being ignored. It just generates an automatic branch name on its own.

I’m having the same issue. Looks like a cursor bug to me.

1 Like

I have also the same issue. it’s cursor bug for sure.

1 Like

I’m having the same issue

1 Like

Could we get an update on this? Our workflows are currently being disrupted. We would also like to know if there is a commitment regarding API stability to prevent such sharp, breaking updates from affecting us again.

2 Likes

same issue here. target.branchName is completely ignored

1 Like

We are having the same issue here

1 Like

same issue i am also facing

1 Like

Hey everyone, this is a known bug. branchName is ignored when autoBranch: true, and when autoBranch: false it breaks autoCreatePr. From the screenshots, even with the right parameter combo, the branch still gets created with an auto-generated name.

The team is aware and the bug is logged. Sadly there’s no ETA for a fix yet, but the number of reports here and in this other thread helps with prioritization.

I’ll update the thread as soon as there’s news.

Any update here ?

Hey, unfortunately nothing has changed yet. The bug where branchName gets ignored is still there. The team is aware, but we don’t have an ETA for a fix yet.

I’ll update the thread as soon as I have news.

Hi, It looks like all of our workflows are currently affected by this; do you have a rollback plan in place?

1 Like

I believe this is working for me now :clap:

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