Submitting tasks from codex cloud CLI fail with “Provided git ref main does not exist” on repos without main branch
Resolved 💬 6 comments Opened Oct 7, 2025 by liamhawkins Closed Oct 28, 2025
What version of Codex is running?
0.45.0
Which model were you using?
_No response_
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
- Have repo where the default branch is not named main (e.g. master).
- Submit new task from codex cloud CLI.
What is the expected behavior?
The submitted task would run against the default branch, regardless of it's name.
What do you see instead?
Error in the codex cloud CLI:Error
<img width="596" height="102" alt="Image" src="https://github.com/user-attachments/assets/023a97a1-b3f5-4fab-a2a3-5fdbd4b3276f" />
And in the codex cloud web UI:Provided git ref main does not exist
<img width="809" height="123" alt="Image" src="https://github.com/user-attachments/assets/bcefafa0-9866-4210-98c3-632d8a1aaf02" />
Additional information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗