This is currently expected: when a repository has a Cloud Environment configured, the automation uses that environment as its source and always starts from the repository’s default branch, so the editor doesn’t show a branch picker for it. I’ve passed this along to the team as feedback, since being able to choose the starting branch here is a fair ask.
In the meantime, you can set the branch in the automation’s prompt. Add something like this at the top:
“Before doing anything else, run git fetch origin <your-branch> && git reset --hard origin/<your-branch> so your working branch starts from <your-branch>. If you open a pull request, use <your-branch> as the base branch.”
Each run still works on its own fresh branch, so the reset is safe and doesn’t change <your-branch> itself. That working branch just starts from your branch instead of the default one, and any pull request will target your branch rather than main. Your environment’s secrets and MCP servers still apply. The environment’s install step runs before the prompt, so if your branch needs different dependencies, you can also ask the agent to re-run it after switching.
Also worth knowing: automations triggered by GitHub events (like a PR being opened or a push) already run on the branch from that event, so this only affects scheduled, Slack, webhook, and similar triggers.
Thanks for the quick response. I actually did exactly that and put a firm instruction at the top of the automation prompt to make sure it’s checked out on the branch that I wanted. Good to know that’s the recommended approach!
I also changed my default branch on the repo. Hopefully, that doesn’t come back to bite me in the ass
Awesome! I think really the only thing to keep in mind is that the default branch applies to all cloud agents on that repository, not just this automation.
Yeah, I changed it from main to staging, because I basically almost always want to be branching from staging and integrating back. This automation in particular is a customer service bot, and I want it to be able to pick up skills changes much faster than main gets updates.