`codex login status` should report daemon auth status separately from stored credentials
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- authentication, cli
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 136k
- Fork
- 21.6k
- Merge medio
- 1m
- PR unite (30g)
- 997
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openai/codex
-
app bug rate-limits
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Windows PowerShell 5.1: non-ASCII text piped into a native command arrives as `?`Forse già presa @akhil9tiet l’ha presa oggi. Apertabug CLI tool-calls windows-os
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openai/codex#64139 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug CLI connectivity
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
core-plugins: remote bundle install keeps the temp directory before a fallible rename and leaves it behind on failureForse già presa @akhil9tiet l’ha presa 1 giorno fa. Apertabug CLI skills
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openai/codex#63907 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug CLI
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openai/codex#63906 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openai/codex
Issue simili
-
My Caps shows "Shared" on private Caps that were never sharedForse già presa @AksharP5 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CapSoftware/Cap#4569 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Document Web UIAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno