`codex login status` should report daemon auth status separately from stored credentials
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- authentication, cli
Research direction
Start by tracing the codex login status command and how it obtains stored credential status, then inspect the app-server daemon status interface and its authentication metadata. Keep diagnostics limited to safe status or account metadata. Done means the command reports stored credentials and daemon auth separately, explains any mismatch, and gives the daemon restart command; add or update tests for matching and differing states.
Written by the indexing model from the issue text.
Description
What version of Codex CLI is running?
codex-cli 0.172.0
What subscription do you have?
ChatGPT account (OAuth login)
Which model were you using?
Not model-specific.
What platform is your computer?
macOS, Darwin 27.2.0 arm64
What terminal emulator and version are you using (if applicable)?
tmux
Codex doctor report
Not included. No secrets or token contents are relevant to this report.
What issue are you seeing?
codex login status reports the credentials available to a newly started CLI/app-server process. The regular interactive TUI can instead use an already-running app-server daemon, whose in-memory auth state is authoritative for that session. The command currently does not identify this distinction or report the daemon's auth state.
This makes Logged in using ChatGPT ambiguous: it confirms that credentials are stored for the current CODEX_HOME, but does not tell the user whether the daemon used by the TUI is logged in as well. In my case, with CODEX_HOME="$HOME/.codex1", codex login status reported a ChatGPT login while the TUI showed the sign-in flow. Restarting that daemon made the TUI recognize the account.
This issue is about status and guidance, not a request for the daemon to treat auth.json as a live source of truth. A running daemon may intentionally retain its auth state until it is restarted or explicitly reauthenticated. The CLI should make that lifecycle visible instead of reporting an unqualified status that can disagree with the TUI.
What steps can reproduce the bug?
- Start Codex with a
CODEX_HOMEand let its app-server daemon run. - Copy valid ChatGPT OAuth credentials into that home while the daemon remains running (for example, copy
~/.codex/auth.jsonto~/.codex1/auth.json). - Run
CODEX_HOME="$HOME/.codex1" codex login status. It reportsLogged in using ChatGPT. - Run the regular interactive TUI with the same
CODEX_HOME. In this reproduction, it showed the sign-in flow while using the already-running daemon. - Run
CODEX_HOME="$HOME/.codex1" codex app-server daemon restart, then launch the TUI again. The sign-in flow disappeared.
No credential values should be included in diagnostics or issue artifacts.
What is the expected behavior?
codex login status should clearly report at least:
- Whether credentials are present in the active
CODEX_HOMEfor a fresh process. - Whether an app-server daemon is running for that home and whether it reports an authenticated account.
- When those states differ, a clear explanation that the TUI uses the daemon's current in-memory auth state, plus the exact command to reconcile it, such as
CODEX_HOME=... codex app-server daemon restart.
The command should compare only safe auth status/account metadata and must not print or expose access or refresh tokens. It should avoid implying that the daemon is broken when it is following its documented process-lifetime auth model; the missing piece is actionable visibility for users.
A daemon auth-reload operation would be a useful follow-up, but it is not required to address the primary diagnostic problem. If reload is unsupported, login status should say so and recommend the restart command.
Additional information
Related issues cover the underlying stale daemon credential behavior: #42771 (closed with the explanation that a running app-server owns its in-memory auth state) and #63304 (API-key rotation). This issue requests a distinct CLI diagnostic: report both the stored credentials and the active daemon state, and explain their mismatch without requiring users to discover the daemon lifecycle themselves.
- Dominant language
- Rust
- Stars
- 136k
- Forks
- 21.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 997
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
app bug rate-limits
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Windows PowerShell 5.1: non-ASCII text piped into a native command arrives as `?`Possibly taken @akhil9tiet claimed this today. Openbug CLI tool-calls windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openai/codex#64139 · 2 comments ·
Maintainers usually reply within 1 day
-
bug CLI connectivity
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
core-plugins: remote bundle install keeps the temp directory before a fallible rename and leaves it behind on failurePossibly taken @akhil9tiet claimed this 1 day ago. Openbug CLI skills
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openai/codex#63907 · 2 comments ·
Maintainers usually reply within 1 day
-
bug CLI
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openai/codex#63906 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
My Caps shows "Shared" on private Caps that were never sharedPossibly taken @AksharP5 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CapSoftware/Cap#4569 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Document Web UIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day