aicx
Switch between Codex and Claude Code accounts without losing local conversation history.
aicx keeps credentials and settings separate for every account. Saved
conversations are shared by default, so you can start with one account and
continue with another.
Install
You need Linux or macOS, Python 3.9 or newer, and the official Codex or Claude Code CLI.
pip install aicx
aicx doctor
Set up two accounts
Codex example
aicx login codex personal
aicx login codex work
Each command launches the official Codex login inside that profile's private
CODEX_HOME, so every profile receives an independently issued OAuth session.
Standard browser OAuth is the default. Device-code login is optional and is
mainly useful on headless or remote machines:
aicx login codex personal --device-auth
If you already have Codex settings and conversations under ~/.codex, import
the safe local state with:
aicx adopt codex personal
For Codex, adopt intentionally excludes CLI and MCP OAuth credential files,
fixes profile-local configuration and session paths, then starts a fresh browser
login for the new profile. It does not change the source directory. Codex OAuth
credentials are never copied between profiles.
Claude Code example
# First account
claude auth login
aicx adopt claude personal
claude auth logout
# Second account
claude auth login
aicx adopt claude work
Profile names are yours to choose. personal, work, and client are only
examples.
Use an account
Launch the provider with @account-name:
aicx codex @personal
aicx codex @work
aicx claude @personal
The last selection is remembered:
aicx codex
aicx claude
Provider arguments pass through normally:
aicx codex @work resume --last
aicx claude @personal --resume SESSION_ID
Rename or delete a profile
aicx rename claude test1 personal # move one tool's profile to a new name
aicx forget claude personal # delete one tool's profile (asks first; --yes skips)
Both act on a single tool. forget keeps the shared conversation history and
leaves the other tool in that profile untouched. Neither works while a tracked
process for that profile is still running.
Accounts and usage
aicx accounts
aicx balance
aicx balance codex --profile work
Keep the balance view open and refresh it every 60 seconds:
aicx balance --watch
Choose another interval when needed:
aicx balance --watch --interval 15
The balance table shows usage, remaining percentage, reset time, and the time left until reset.
Pick the columns you care about; the choice is saved and reused on the next run:
aicx balance --columns tool,profile,window,usage,reset-in
aicx balance # same columns as last time
aicx balance --reset-columns # forget the choice, show every column
Column names: tool, profile, active, account, window, usage,
left, reset-in, reset, source.
Conversation history
aicx synchronizes saved history before a provider starts and after it exits.
This lets you exit a conversation and resume it with another account.
Do not open the same conversation from two accounts at the same time. History sharing supports sequential handoff, not concurrent editing.
# Manual synchronization
aicx sync codex
aicx sync claude
# Optional: disable sharing
export AICX_CODEX_HISTORY=isolated
export AICX_CLAUDE_HISTORY=isolated
Credentials remain private to each account profile. They are never shared with the conversation store.
Codex OAuth troubleshooting
If Codex or codex_apps fails with HTTP 401, token_revoked, or
Encountered invalidated oauth token, older aicx versions may have copied one
rotating OAuth refresh token into more than one profile.
aicx doctor
aicx accounts codex
aicx login codex personal --force
aicx login codex work --force
Run the forced login once for each affected profile. The safe forced-login flow
removes only that profile's local Codex CLI credential before starting a fresh
login. It preserves settings, sessions, history, MCP credentials, and the
profile name, and it does not run codex logout or revoke a token that an older
cloned profile may still hold.
Do not use codex logout to migrate profiles that may contain cloned OAuth
credentials. aicx doctor compares one-way refresh-token fingerprints and
never prints credential values.
TODO
- Test the complete workflow with multiple real Claude Code accounts. Multiple Codex accounts are tested.
- Add and test VS Code account integration.
- On macOS, confirm profile-local Claude credentials when the login Keychain
holds a
Claude Code-credentialsitem (Codex is pinned to file storage).
More documentation
License
Metadata
Release files for aicx 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aicx-0.4.0.tar.gz | 40.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aicx-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.1 kB
Release files / aicx-0.4.0.tar.gz
| Download URL | aicx-0.4.0.tar.gz |
|---|---|
| Size | 40.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
403dc6da1c562d4c3575982c09b0ec3b756a6ffbd9c0b790d6417f22630ba65c
|
|
BLAKE2b-256 checksum How to use checksums |
dd01f74bed80a826834d0a8950c4e064dd2b0a566504bd5cedb43810e738408a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Release files / aicx-0.4.0-py3-none-any.whl
| Download URL | aicx-0.4.0-py3-none-any.whl |
|---|---|
| Size | 34.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f32ffe2330207438e67a28ab080be0820b94a3550319793e312c3a0695d1216f
|
|
BLAKE2b-256 checksum How to use checksums |
89be8680923d392a65786857275cf6ff69f74bcbb4b7e1d4a0b128f48fa8fcf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.5
|
Security for aicx 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.