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
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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?

  1. Have repo where the default branch is not named main (e.g. master).
  2. 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_

View original on GitHub ↗

6 Comments

imkebe · 10 months ago

Same. One repo recently added is visible while the second one is nonexistent for the codex.

derspotter · 8 months ago
Same. One repo recently added is visible while the second one is nonexistent for the codex.

same here

smuhammathassan · 8 months ago

still getting the same issue

dkhgh · 7 months ago

Same issue

Kuret · 7 months ago

@nornagon-openai can you reopen this? This is obviously still an unresolved issue.

etraut-openai contributor · 7 months ago

@Kuret, if you're seeing something like this with recent versions of Codex, please open a new issue with details.