# Connect Codex

Just have Codex installed and signed in with your ChatGPT account: the card appears on its own.

**Shows:** the 5-hour and weekly limits of your ChatGPT plan, available reset credits (`↻ N`), and whether Codex is working.

## Step by step

1. Install Codex: the CLI (`npm i -g @openai/codex`) or the desktop app.
2. Sign in with your ChatGPT account (`codex login` in the terminal or through the app).
3. Open QuotaDesk. The Codex card shows up automatically.

## Where the data comes from

QuotaDesk runs `codex app-server` in the background and only queries account limits (`account/rateLimits/read`), including 5-hour window, weekly window and extra reset credits when provided. Activity comes strictly from event types in local session logs under `%USERPROFILE%\.codex\sessions` (command, edit, reasoning).

Message content is never read, and nothing is sent to any model.

**Frequency:** follows your **Settings › Data** polling interval (15s, 30s or 60s) and refreshes immediately on `F5` or from the card menu. On failure, the card keeps the last reading marked as stale and never invents numbers.

## If it doesn't show up

| Message on the card | What to do |
|---|---|
| *Codex CLI not found.* | QuotaDesk searches for `codex.exe` in `PATH` and `%LOCALAPPDATA%\OpenAI\Codex\bin`. If it's elsewhere, set the `AI_MONITOR_CODEX_EXE` environment variable to the full `codex.exe` path and restart QuotaDesk. |
| *No limit window available.* | API key logins do not have 5-hour or weekly subscription limits. Sign in with your ChatGPT account. |
| *Could not read the Codex limits.* | Run `codex` once in a terminal to verify your login is valid, then choose **Refresh usage** in the card menu (`⋯`). |

To hide Codex if you don't use it: **Settings › Connections**, toggle its switch off (or click **Hide tool** in the card menu).
