DaddyNote

UK, Irish and EU money and travel rules, worked through step by step, with the date each figure was checked.

AI how-to notes · 2026-09-17 · last run 2026-09-17 · 한국어 원문

Checking Codex CLI login status — codex login status, and where usage lives (/status, /usage)

One line summary

codex login status tells you in one line whether you're logged in. On our PC it printed Logged in using ChatGPT. Usage is documented as something you view with /status and /usage inside the chat screen, and the help text we checked had no usage command at all.

In this PC's ~/.codex we confirmed a file named auth.json. We did not check its contents or where authentication is actually stored.

Who this is for

Test environment

ItemValue
OSWindows 11 Home (10.0.26200)
ShellGit Bash
codexcodex-cli 0.153.4
CODEX_HOME environment variableunset or empty (printed as CODEX_HOME=unset)
Login methodChatGPT account (per the output below)

We never ran codex login or codex logout while writing this note.

1. Finding the status command in the help text

The command list in codex --help has two login-related lines.

  login             Manage login
  logout            Remove stored authentication credentials

The subcommand list in codex login --help has status and help.

Usage: codex login [OPTIONS] [COMMAND]

Commands:
  status  Show login status
  help    Print this message or the help of the given subcommand(s)

The same help text shows --with-api-key, --with-access-token and --device-auth as login method options. codex login is the command that manages login, so when you only want the state, typing status explicitly is the safe habit (we did not run it with no options this round).

2. Running codex login status

codex login status
Logged in using ChatGPT

The exit code was 0. The account email was not printed. Our records show standard output was empty and this line went to standard error, so a script that captures standard output only — codex login status > status.txt — will miss the message (we did not run that exact form). Add 2>&1, or judge by the exit code.

We also looked at what a codex that isn't logged in prints. This is the same command on codex 0.154.0, installed temporarily in WSL Ubuntu. The install and version check are written up in Installing Codex CLI in WSL (Ubuntu).

Not logged in

The exit code here was 1. In this round we got 0 in the logged-in Windows environment and 1 in the not-logged-in WSL environment. We did not check exit codes for other failure cases such as network errors.

3. The wider view from codex doctor

codex --help also lists doctor Diagnose local Codex installation, config, auth, and runtime health. We ran it with the summary option.

codex doctor --summary --no-color --ascii

The auth-related lines came out like this (excerpt from the full output).

Configuration
  [ok] config       loaded
  [ok] auth         auth is configured
  [ok] mcp          1 server (1 stdio) · 0 disabled
...
Connectivity
  [ok] network      no proxy env vars
  [ok] websocket    connected (HTTP 101 Switching Protocols) · 15s timeout
  [ok] reachability active provider endpoints are reachable over HTTP
...
22 ok | 1 idle | 3 notes | 1 warn | 0 fail degraded

auth is configured only tells you credentials exist. codex login status was clearer about the login method. doctor also has a --json option (Emit a redacted machine-readable report), which we did not use here.

4. Where the credentials file lives

The help text gives the config file location as ~/.codex/config.toml and the profile file location as $CODEX_HOME/<name>.config.toml. On this PC CODEX_HOME is unset or empty, so we looked at .codex in the home folder. We listed names only in this PC's ~/.codex and did not open any file.

ls -1Ap "$HOME/.codex"

Narrowed to the names that relate to auth and config:

auth.json
auth.json.bak_20260908
config.toml
config.toml.bak-20260804
installation_id
version.json

The same folder also held sessions/, log/, history.jsonl, several .sqlite files and more. auth.json looks like the file where login information is stored (judged by the name; we did not check the contents). A name auth.json.bak_20260908 was there too. We did not check who created it or what is in it, so treat it as if it may contain credentials. Don't share this folder wholesale or copy it to another PC.

5. Where usage is shown

Neither codex --help nor codex login --help had a command that shows usage or rate limits. The official documentation's slash command list does.

https://developers.openai.com/codex/cli/slash-commands redirects to https://learn.chatgpt.com/docs/developer-commands?surface=cli (checked 2026-09-17). From the document:

/status Display session configuration and token usage. Confirm the active model, approval policy, writable roots, and remaining context capacity.
/usage View account token usage or use a rate-limit reset. Inspect daily, weekly, or cumulative ChatGPT token activity from inside the TUI.

The same page also carried /status Show the chat ID, context usage, and rate limits. From the excerpts we pulled, there's no telling which screen's list that one belongs to.

So: run codex with no arguments to open the chat screen (the TUI), then type /status or /usage. We did not open the chat screen this round, so we are not printing either command's real output.

Results

How we checkedResult on this PCNote
codex login statusLogged in using ChatGPT, exit code 0printed to stderr
Same command on the not-logged-in WSL codexNot logged in, exit code 1from the WSL install note
codex doctor --summary[ok] auth auth is configured22 ok, 0 fail
~/.codexauth.json, config.toml and others presentnames only
UsageNo usage command in the codex --help and codex login --help we checked. Official docs point to /status and /usage in the TUInot run

What failed

What we did not test

Related notes