codex exec stopped working while TUI works

Resolved 💬 3 comments Opened Jan 9, 2026 by mjp0 Closed Jan 11, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

I don't know why but if I run codex, everything works but codex exec "say hi" returns ERROR: Quota exceeded. Check your plan and billing details.. My limits are at 100% in Codex usage dashboard, so everything should be good.

What could be causing this? Doesn't both codex and codex exec use the same ~/.codex/auth.json for authentication?

View original on GitHub ↗

3 Comments

etraut-openai contributor · 7 months ago

Yes, codex and codex exec use the same auth.json file, so something sounds amiss here.

etraut-openai contributor · 7 months ago

Here's an idea. Run codex and /logout. Then run codex login and then go through the ChatGPT login flow. This should clear any cached auth details. Then try codex exec. Does that fix it?

I'd normally ask you to run /feedback to upload your logs, but codex exec doesn't support /feedback.

mjp0 · 7 months ago
Here's an idea. Run codex and /logout. Then run codex login and then go through the ChatGPT login flow. This should clear any cached auth details. Then try codex exec. Does that fix it? I'd normally ask you to run /feedback to upload your logs, but codex exec doesn't support /feedback.

I figured this out finally. It was happening because I had CODEX_API_KEY set with some dummy value from testing and looks like exec tries to use that first but TUI doesn't.