Use already logged in ChatGPT account to sign in to Codex CLI

Resolved 💬 3 comments Opened Feb 6, 2026 by sin4ch Closed Mar 20, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

I get signed out of Codex pretty quickly. I would like that since I'm already signed in in my browser, once I run codex auth, it should just use the account already signed in to in my browser rather than requiring that I re-sign in to the account.

Additional information

_No response_

View original on GitHub ↗

3 Comments

wbdb · 6 months ago

I haven't had to log in to Codex CLI for weeks. Delete Codex, remove the configuration files, and start again from scratch. Something's not right.

Or first try delete auth.json, restart codex an login again https://developers.openai.com/codex/auth/

etraut-openai contributor · 6 months ago

@sin4ch, when you say that you "get signed out of Codex pretty quickly", are you manually logging out (e.g. codex logout or /logout from within the app)? Once you're logged in, you should stay logged in indefinitely. If that's not the case, please describe what happens when you get signed out and any clues about how to repro the problem.

etraut-openai contributor · 5 months ago

This feature request hasn't received enough upvotes, so closing.