Skip to content

rmqg/codex-multi-account

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codex-multi-account

Use multiple Codex accounts locally without changing how the official Codex CLI works.

The installed commands are still short:

cx        # run Codex with automatic account selection
cxa       # same idea, explicit auto mode
cxr       # resume the last conversation
cx-setup  # create account folders and shared state

Install

npm install -g github:rmqg/codex-multi-account

Update with the same command.

First Setup

Create account folders. Replace 3 with your account count.

cx-setup --accounts 3 --migrate

Log in once per account:

CODEX_HOME="$HOME/.codex-account1" codex login
CODEX_HOME="$HOME/.codex-account2" codex login
CODEX_HOME="$HOME/.codex-account3" codex login

Check everything:

cx status
cx quota

cx-setup does not symlink config.toml: each account can need its own login/provider/profile defaults. If your shared ~/.codex/config.toml contains top-level user-only settings such as notify, setup syncs them into every account config and removes them from the shared config so Codex will not treat them as unsupported project-local settings.

cx quota shows a weighted weekly total first, then one weekly bar and reset time for each account. It identifies the weekly quota by Codex's reported 10080-minute window instead of assuming primary or secondary means a fixed quota type. When Codex does not report a capacity for the weekly window, that account is counted as one equal-weight unit and the total label says so. Quota probes use a 30s timeout, 3 attempts, and a 1500ms retry delay by default; tune CX_LIMIT_TIMEOUT_MS, CX_LIMIT_RETRIES, and CX_LIMIT_RETRY_DELAY_MS if your network is unstable.

During one auto-switched task, model/profile/reasoning defaults stay with the task. New Codex task runs leave service_tier unset so Codex can use the selected model's default without unsupported-tier warnings. If you use /fast or /fast on during the task, retries inherit service_tier="fast"; /fast off removes that override instead of changing reasoning effort. If the interrupted session records a later reasoning effort, for example from /slow or turn context, retries keep that reasoning effort too.

Run Codex:

cxa
cx exec "explain this repo"
cxr

Optional

Install the direct codex wrapper so plain codex also auto-trusts the current project:

cx-setup --install-codex-wrapper --force

Docs

License: GPL-3.0-only.

About

Small account-switching wrappers for the OpenAI Codex CLI

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages