Make cursor agents follow branch-naming conventions

Feature request for product/service

AI Models

Describe the request

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.

4 Likes

Also just stumbled into this!

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.

Would be awesome to have a way to configure this!

1 Like