Repository navigation
v2.17.0
v2.17.0
Fixes Codex CLI 0.156+ refusing every request with "selected workspace missing from routing discovery", and adds an opt-in native desktop binding with capability-aware routing, API/ZDR credential pools, subscription reset credits and a cross-provider mcodex resume picker.
Landed as #699, #701, #702, #703, #704 and #705, plus two Windows launcher fixes and a quota reset-time fix on main.
What's new
- With runtime rotation on, interactive
mcodex resumeshows every saved session in the project, including desktop sessions saved under theopenaiprovider that Codex's own picker hides.--allwidens it to every directory and-C <dir>changes the project. Explicit session ids,--last, remote, non-interactive and in-session/resumebehave as before, and if discovery fails you get the native picker. Needs a Codex version with app-serverthread/list(#699). rotation bind-app --nativekeeps the desktop app on its real OpenAI login, so Remote Control pairing and other account features keep working, while inference still goes through your account pool. It needscli_auth_credentials_store = "file"in the same Codex home.--custom-providerorunbind-approlls it back (#702).- In native mode, requests only go to an account and workspace whose catalog advertises the requested model, reasoning effort and speed. Catalogs refresh after 5 minutes, and a catalog outage never blocks inference (#702, #705).
- Native mode also serves Responses over WebSockets, with the same auth, routing and usage tracking as HTTP. A sent request is never replayed after an ambiguous disconnect (#705).
- Native subscription scheduling tries accounts above a 5% reserve first, then by priority tier, then by the earliest quota reset (#705).
login --apiadds API and ZDR credentials as explicitapi/<model>andzdr/<model>pools. Each pool fails closed when it runs out, and ordinary subscription requests never fall back to paid API credentials (#705).fix --liverepairs accounts saved before this release whose workspace Codex CLI now refuses (see Fixes) (#701).
New commands (#705):
| Command | What it does |
|---|---|
check accounts / check resets / check capabilities |
Run one part of check. Unknown arguments exit 1. |
check --prime |
Also send a tiny first-use request to unused Personal subscriptions. This starts their 5-hour and weekly windows and uses quota. |
account priority <index> <0..9> |
Set a subscription account's tier. Lower goes first; the default is 1. |
account auto-prime <index> on|off |
Let a running router prime this account every 15 minutes. Off by default. |
resets list [--refresh] |
Show earned subscription reset credits per account. |
resets redeem <account-number> |
Redeem one reset credit. |
resets auto manual|last-resort |
last-resort redeems automatically only when every eligible subscription is blocked; manual (the default) never does. |
login --api |
Add or edit API/ZDR credentials, their tiers and visible models. |
Fixes
- Codex CLI 0.156+ checks
tokens.account_idin~/.codex/auth.jsonagainstwham/accounts/checkbefore every request. 2.16.0 wrote an org-sourced account'sorg-...id there, which is never a ChatGPT workspace, so every request failed afterswitch,best, rotation or login.auth.jsonnow gets the token'schatgpt_account_idinstead (#703, #700). - An
auth.jsonthat an older release already wrote with anorg-...id is flagged as drift, and the next login dashboard render ordoctor --fixrewrites it (#703). - Switching to an account with no saved workspace id no longer leaves the previous account's workspace id in
auth.jsonnext to the new tokens (#703). best --live,forecast --liveandreport --liveoverwrote an explicit--orgor org-sourced workspace with the token's default whenever they refreshed a token. They now keep it, like every other refresh path (#701).- On Windows, a token refresh whose
accounts.jsonwrite kept failing (EBUSY or EPERM from a scanner or sync client) threw away the new refresh token, although the old one was already spent upstream, so the account needed a fresh login. The new token now stays live and is journaled to<accounts-file>.pending-auth.json(mode 0600) until a save lands (#705). - An absurd quota reset header (such as a 308-digit
reset-after-seconds) overflowed to Infinity, so the window read as never resetting. Reset times are now capped at 7 days ahead and non-numeric ones are dropped, and wait times that can't be computed print asunknowninstead ofNaNsorInfinitym NaNs(45b7dd20). - On Windows, when package lookup and
npm root -gboth missed, the PATH scan only triedcodex.exeand an extensionlesscodex. An npm prefix holdscodex.cmdplus an extensionless sh shim, so launch failed. The scan now findsnode_modules\@openai\codex\bin\codex.jsbehind the shim and runs it with node (ad59405c). - On Windows,
CODEX_MULTI_AUTH_REAL_CODEX_BINpointing at npm'scodex.cmdor its sh shim failed every launch. It now resolves to the package'scodex.js, or stops with a message namingcodex.exe(933c1ff7). - On macOS and Linux, the app-server shim that
codex appuses under runtime rotation was a hard link or copy of the Node binary in~/.codex/multi-auth/app-server-shims/. A Node that loads its shared library relative to its own path, such as current Homebrew Node, could not start from there, so the desktop app's app-server launch failed. The shim now runs the original Node in place (#705).
Security
honois pinned to4.13.9. 2.16.0 shipped4.12.33, inside the<=4.13.4range of GHSA-8j4g-w8fx-2239, GHSA-f23p-vx2j-j53r, GHSA-79qm-7rj5-m7r9, GHSA-54fx-42gc-7vw4, GHSA-gqvv-2mrq-wpjv, GHSA-g6gw-c38x-mqfc and GHSA-crvj-82cr-hjcx (#704).- The dev-only
nanoidis pinned to3.3.18for GHSA-2v37-7h3g-55p8 (#704).
Heads up
- New logins pick a uniquely identified Personal workspace over an organization default. 2.16.0 preferred the org default. With several workspaces and no unique Personal one, an interactive login asks you to choose, and cancelling saves nothing. A non-interactive login keeps the automatic choice and warns with the
--orgremedy. loginnow askswham/accounts/checkwhether the chosen workspace is authorized (one request, 10-second timeout, fails open). An unauthorized automatic choice is replaced by the backend's default account. An explicit--orgorCODEX_AUTH_ACCOUNT_IDbinding is saved as you chose it, butauth.jsongets the authorized default and the login warns (#701).- Plain
checknow also refreshes reset credits and model discovery. API capability probes are billable, run only for credentials you opted in, and reuse results younger than 15 minutes. Onlycheck capabilitiesforces them. checknow rejects unknown arguments with exit 1 (2.16.0 ignored them), so scripts passing extra flags tocheckneed updating.- Nothing primes an unused subscription unless you ask: pass
--prime, or turn onaccount auto-primefor that account. The dashboard's checks never prime. Priming uses subscription quota. API/ZDR credentials and reset credits are never used for it. - A
switchpin stays strict in every mode, native included. Priority tiers, the 5% reserve and automatic reset redemption only apply when nothing is pinned. An unavailable pin fails with 503codex_pinned_account_unavailable, and in native mode a pin refuses a model the pinned account doesn't advertise with 403model_not_available_in_account_catalog. status --jsonadds top-levelapiAccounts,totalAccountCount,selectionModeandmodelInventory, and per-accountpriority,autoPrime,lastInferenceRequestAt, reset-credit fields and forecast fields (forecastRiskScore,forecastRiskLevel,forecastQuotaUpdatedAt,selectionPreference,automaticOrder,subscriptionReserve,quotaResetAt,quotaDrainPerHour).fix --live --jsonreportsrebound-unauthorized-workspaceandcodexActiveSynced.- Existing app binds keep their provider mode, also across
reset-runtime. New binds stay on the custom provider unless you pass--nativeor setCODEX_MULTI_AUTH_NATIVE_OPENAI=1. ws(8.21.3) is a new runtime dependency.api-routes.jsonstores API keys in plain text (mode 0600 on macOS/Linux; Windows relies on your user profile's ACLs).- New local files:
api-routes.json,reset-credits.json,api-capability-probes.json,inference-activity/,<accounts-file>.pending-auth.jsonand<accounts-file>.automatic-checks.json(hashed keys and attempt times only).uninstall --clear-accountsand the dashboard's delete-all reset remove all of them exceptautomatic-checks.json.
Upgrade
npm i -g codex-multi-auth
codex-multi-auth --versionIt should report 2.17.0.
If Codex CLI 0.156+ fails with "selected workspace missing from routing discovery", run:
codex-multi-auth fix --liveIt checks each org-sourced account, rebinds any the backend no longer authorizes, and resyncs ~/.codex/auth.json when the active account changed. New logins need no extra step.
Downgrading: versions before 2.17.0 drop account priority tiers the next time they write any account policy. Re-run account priority after upgrading again. See docs/upgrade.md.