by ndycode
Codex CLI multi-account OAuth manager with account switching, health checks, runtime rotation, diagnostics, and recovery tools for @openai/codex
# Add to your Claude Code skills
git clone https://github.com/ndycode/codex-multi-authGuides for using cli tools skills like codex-multi-auth.
Last scanned: 11/29/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@eslint/config-array: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/eslint-plugin: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/parser: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/type-utils: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/typescript-estree: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/utils: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "eslint: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "eslint-plugin-import-x: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "hono: Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "minimatch: minimatch has potential denial of service via globparts amplification",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "undici: undici vulnerable to Denial of Service via unbounded memory in the EventSource parser",
"severity": "high"
},
{
"type": "npm-audit",
"message": "zod: Zod can exhaust memory while validating oversized constrained collections",
"severity": "high"
}
],
"status": "WARNING",
"scannedAt": "2026-11-29T14:01:48.295Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}codex-multi-auth is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ndycode. Codex CLI multi-account OAuth manager with account switching, health checks, runtime rotation, diagnostics, and recovery tools for @openai/codex. It has 572 GitHub stars.
codex-multi-auth returned warnings in AgentsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.
Clone the repository with "git clone https://github.com/ndycode/codex-multi-auth" and add it to your Claude Code skills directory (see the Installation section above).
codex-multi-auth is primarily written in TypeScript. It is open-source under ndycode on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh codex-multi-auth against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
codex-multi-auth is a multi-account OAuth manager for the official @openai/codex CLI. It keeps a named pool of ChatGPT sign-ins on your machine, lets you switch the active account, and — when you run Codex through its optional wrapper — rotates accounts across live requests through a loopback-only proxy. It never installs or shadows a codex binary; the official OpenAI install keeps owning that command.
Use it when one Codex account is not enough: you hit rate limits or quota windows, you split work across organizations and workspaces, you want per-project account pools, or you run unattended agents that need JSON diagnostics and safe repair commands instead of one opaque auth file.
Using OpenCode rather than the Codex CLI? The sibling project oc-codex-multi-auth is the plugin that manages the same kind of account pool there.
Refresh leases block uncoordinated OAuth refresh on lock errors or timeouts. For live re-login behavior and interrupted-refresh recovery, see the upgrade notes.
~/.codex/multi-auth (files 0600, directories 0700), with per-project pools under projects/<project-key>/.codex-multi-auth login --api supports Global and US endpoints per credential. Choose US (us.api.openai.com) for a US-regional project; existing credentials remain Global. Each credential stays on its chosen endpoint, and Responses failover remains within the first eligible credential’s region. Regional routes use store version 2, so older builds reject them rather than silently discard their region.login --api offers Regular API, ZDR, and PSP (Private Safety Processing). ZDR approval and PSP project enrollment are operator-confirmed, never inferred from a key or successful discovery. Select api/<model>, zdr/<model>, or psp/<model> explicitly; failover stays within that pool and the selected region on HTTP and WebSocket connections. Global/US region selection remains separate. Choosing PSP does not enroll a project or modify provider privacy settings.login --api can attach operator-declared Daybreak Red access and reasoning efforts to a selected model when discovery omits them. These declarations enable matching routes without claiming probe verification. Reasoning declarations use store version 3, so older builds cannot silently strip them.fix/doctor/verify commands that recover stale or damaged local state.gpt-reserve as a separately metered Luna allowance, automatically falls back after a genuine Luna quota 429, and exposes the Reserve percentage through limits --json --refresh.| Binary | Role |
|---|---|
codex-multi-auth |
The account manager. Runs all management subcommands locally (login, status, web, switch, forecast, rotation, fix, ...). The auth prefix is optional: codex-multi-auth login ≡ codex-multi-auth auth login. |
codex-ma |
Short alias for codex-multi-auth, including the local real-time web dashboard. |
codex-multi-auth-codex |
Opt-in wrapper. Handles auth ... locally and forwards every other command to the official Codex CLI, enabling the rotation proxy for request-bearing commands. |
mcodex |
Convenience launcher over the wrapper, with optional --monitor and --tmux modes. No account logic of its own. |
codex-multi-auth-app-launcher |
User-level OS launcher routing helper (Windows shortcut, macOS wrapper app, Linux .desktop). |
Requirements: Node.js >= 22.19, and the official Codex CLI on PATH (npm i -g @openai/codex, Homebrew, or a release binary).
npm i -g codex-multi-auth
[!NOTE] The legacy scoped prerelease
@ndycode/codex-multi-authis migration-only. Installcodex-multi-authfor all new setups; see docs/upgrade.md to migrate.
# 1. Sign in a ChatGPT account (browser OAuth, loopback callback on localhost:1455)
codex-multi-auth login
# 2. Repeat login to add more accounts, then inspect the pool
codex-multi-auth status
codex-ma web --no-open
# 3. Probe account health and preview which account would serve next
codex-multi-auth check
codex-multi-auth forecast --live
Headless or remote shell? Use codex-multi-auth login --device-auth — no callback port needed. Blocked browser? See alternate login paths.
Run Codex through the wrapper so requests rotate across the pool:
codex-multi-auth-codex # interactive TUI, rotation on by default
codex-multi-auth-codex exec "summarize this repo"
mcodex # same wrapper, shorter name
codex-multi-auth ships 31 subcommands. The full surface — every flag, hotkey, and JSON mode — is in docs/reference/commands.md.
| Group | Commands | Purpose |
|---|---|---|
| Accounts | login, list, status, switch <i>, unpin, workspace |
sign in, inspect the pool, pin or switch the active account, select or enable/disable workspaces |
| Selection | forecast, best, why-selected, check, limits, models |
preview, explain, and probe which account serves the next request |
| Runtime | rotation status enable disable bind-app unbind-app reset-runtime reset-rate-limits |
inspect and control live rotation and the app bind |
| Repair | fix, doctor, report, verify, verify-flagged, uninstall |
diagnose and repair storage, flagged accounts, and install residue; machine-readable health report |
| Governance | usage, budget, account, monitor, history, resets |
usage ledger, budget limits, tags/weights/pause/drain, snapshots |
| Local clients | bridge, integrations |
bearer tokens and client snippets for the loopback bridge |
| Config | config explain template, init-config, debug bundle, features |
effective-config report, config templates, sanitized debug bundle |
Everyday examples:
codex-multi-auth switch 2 # pin account #2
codex-multi-auth report --live --json # full machine-readable health report
codex-multi-auth fix --live --model gpt-6.1-sol # live repair probes with a chosen model
codex-multi-auth doctor --fix # diagnose and apply the safest fixes
codex-multi-auth usage --since 24h --by model # local usage ledger summary
codex-multi-auth rotation status # is live rotation enabled?
With rotation on (the default), request-bearing wrapper commands — exec, review, resume, fork, app, and the bare TUI — route through a local proxy that picks the healthiest account per request, refreshes tokens as needed, and fails over across the pool on rate limits within a bounded retry budget. The proxy listens on loopback only, authenticates its own clients with a per-process token, forwards only Responses API, model-discovery, image, thread-goal, POST /transcribe, POST /alpha/search (web search), and native voice calls (/live and /realtime/calls, plus the call's sideband WebSocket), and never writes account emails or tokens to client headers or logs. Transcription preserves the incoming multipart audio body and boundary, uses managed ChatGPT OAuth, and does not replay ambiguous audio uploads across accounts. Plain codex is never touched: rotation exists only inside codex-multi-auth-codex/mcodex sessions, or inside the packaged desktop app after an opt-in, reversible bind. Turn it off with codex-multi-auth rotation disable or CODEX_MULTI_AUTH_RUNTIME_ROTATION_PROXY=0.
Local rate-limit blocks are valid for at most one hour. The next request then rechecks upstream, including for a hard-pinned account, so an out-of-band quota