When I kick off a Cursor agent, it automatically creates a branch with a name like cursor/<something-relevant-but-often-quite-long>. But what I need is for it to follow our repo’s branch-naming convention and rules - as we rely on that for various reasons. For example we normally can derive the Vercel dev deployment URL of the branch from the branch name. But, as the Cursor agent doesn’t restrict the length of the branch names, it can result in a Vercel dev deployment that cannot be derived. For example:
Branch name: cursor/<something-relevant-but-often-quite-long>
Dev deployment URL: https://myproject-git-something-relevant-but-oft5136231235-myproject-app.vercel.app
I would like to be able to define, in some rules file, how the Cursor agent should name branches.
Would be great to be able to configure the agents to follow a specific pattern.
In our case, we always structure the branch name like `(company-prefix)-(ticket-number)/(name)`. This ensures that Linear as the project management tool can link the PRs to issues, which is a part of our ISO 27001 certification for auditing reasons of changes.
As a first step to comply, we created a bucket ticket such that each Cursor Agent would always follow `(company-prefix)-(fixed-ticket-number)/(name)`. I tried to create an agent rule to urge the agent to create branches this way, however, it seems that the agent is already started on a specific generated branch.
Our content management system requires that branches start with a specific convention in order to be merged into the relevant versions, so branches created by Cursor are effectively useless which prevents us from using cloud agents at all.
I have a similar issue. I have a rule in AGENTS.md that allows the agent to use the Atlassian MCP to recognize ticket numbers, pull the tickets, and ingest whatever is in the ticket into its context window, then generate a branch name in the correct format with the ticket number.
However, I am running into two problems:
The Atlassian MCP integration’s authorization is short-lived, so if I spawn an agent from, say, a Github thread or Slack integration, it may fail silently to connect to Atlassian and
Cursor cloud agents seem to insist on having a branch-name prefix, which is, by default, cursor/. I do not want this but if the field is left blank, it goes with the default.
For us, specifying a different static prefix isn’t enough to solve our issues.
Ideally when launching (in one of our cases) cloud agents via Linear I would expect cursor to use the branch name that Linear generates as parts of our CI does magic stuff based on that specific branch name.
Not having the linear issue id in the branch name also prevents linear from auto tracking PR status.