Branch naming - is there any way to set it?

I am deploying my application via Cloud flare, which will auto-deploy PRs based on the branch name. Because my application uses OAuth, and OAuth does not allow wildcards, I want it to generate one of a series of predefined names for every PR so that it will go to a known subdomain.

I have tried just about every way I can think of to get Codex to set the branch name and none have worked (direct prompting, AGENTS.md, etc.). It always sets it to codex/change-description. I’ve managed to get it to set the title and/or content of the PR to a static string, but that is worse than useless.

Has anyone found a way to accomplish this?

In the codex web version, in /settings/general you can set the branch format

But it has to have a tag for “uniqueness” (the date is unique?). So can’t assign it to a select set, static, or any other kind of identifier. I’ve tried saying “this feature is called orange” - which you’d think might translate to {feature} - but it still interprets the branch name, even when it does NOT further interpret titles and such.

I should probably just give in and have Codex merge into a “preview” branch, and then just manually merge preview into main. That would obviously be much less effort at this point.

Give the preview branch a try. I do this too. The benefit is that you can break down one pr into parts and merge each part into the preview. If codex spits out nonsense, you can toss it and iterate over your preview branch again.

I ultimately landed on a better solution. Moving to Cloudflare Workers, rather than Pages, I made a simple deployment script that just keys off the branch name. For main, it uploads the production version. For beta (which I made my default branch/PR target), it uploads to “beta-.xyz.workers.dev”. And then for “codex/*” it uploads to “codex-…” so for a given PR - as long as I look at one at a time - I can preview it there before merging into beta. And then when everything is happy, I merge to main.

This way all my addresses are predictable to make things easier and make OAuth work.