Skip to content
github-actions[bot] edited this page Nov 24, 2026 · 25 revisions

Codex

clauth runs OpenAI codex accounts beside your Claude Code ones. A codex profile is a ChatGPT login clauth stores, keeps refreshed and launches codex under, in a CODEX_HOME of its own, so several ChatGPT accounts can be used from one machine and rotate under their own auto-switch chain.

Requires the codex CLI on PATH and a ChatGPT login (codex login); an API-key-only codex setup has no token chain to manage and is refused. Built and verified against codex 0.145.

Add an account

Three ways in: adopt the login your own codex holds, mint a fresh one in the browser, or create one from the Setup tab. None switches to the profile, and the two CLI forms need no Claude Code.

Adopt the login your own codex holds

codex login                # once, in your own shell, if you have not already
clauth login work --codex  # adopt it as codex profile 'work'

clauth reads your own codex's auth.json — the home $CODEX_HOME names when you set one, else the home a clauth start session carries, else ~/.codex — copies the chain into ~/.clauth/profiles/work/auth.json with every key codex wrote and last_refresh set to the capture time, records the profile in ~/.clauth/codex-profiles.toml, then replaces that same auth.json with a symlink onto that store. From inside a clauth start codex session, where CODEX_HOME names the session's own home, the capture refuses instead (When something is refused). It prints:

clauth: captured the operator codex login into codex profile 'work'
clauth: /home/you/.codex/auth.json now follows the profile store. Your own codex and clauth sessions share one chain
clauth: while it does, `codex login` and `codex logout` reach 'work's chain through that link and revoke it server-side. Remove the link first if you mean to mint a chain for a different account

One physical file is the point. A codex refresh token is single-use and rotates on every refresh, so two copies of one chain kill each other: the first copy to refresh spends the token the other still holds. With the link in place your own codex, every clauth start work session and clauth's own refresher all read and write the same file, and codex reloads it before spending, so they cooperate.

Do not run codex login or codex logout through that link. codex's own login and logout revoke the login they find at ~/.codex/auth.json on the server (clauth refuses a capture through such a link for the same reason), and through the link that login is the profile's chain: the profile dies on the server, and no re-capture brings it back. To log your own codex into a different ChatGPT account, remove the link first (rm ~/.codex/auth.json leaves the profile intact), then codex login, then capture that into a second profile.

Running the capture again on an existing codex name re-captures in place. It refuses to swap the ChatGPT account under a name ('work' stores ChatGPT account <old>, but this login is account <new>. Log into a new profile, or delete 'work' first), and it refuses while a session of that profile is live.

Mint a fresh login in the browser

clauth login spare --codex --browser

clauth runs codex's browser login itself and lands the minted chain straight in the profile store. Your ~/.codex is not read and not changed. It prints clauth: opening <url> and clauth: if the browser did not open, paste that URL into it, waits for the sign-in, then:

clauth: logged a fresh codex chain into codex profile 'spare'
clauth: ChatGPT account <id>
clauth: run it with `clauth start spare`. Your own ~/.codex is untouched

The sign-in page sends the browser back to http://localhost:1455/auth/callback (port 1457 when 1455 is taken), and the listener binds the loopback address alone, so the browser has to run on the machine clauth runs on, or have that port forwarded to it. With both ports held: codex's login ports (1455 and 1457) are both in use. Close whatever holds them (another codex or clauth login?) and retry. Five minutes without a callback ends in timed out waiting for the codex login callback; declining the consent page ends in you declined the authorization request. Either way nothing is written and the command can be re-run.

A name already held by a Claude Code profile is refused for either form: 'work' is a claude profile. Profile names span both harnesses, so pick another. Profile names are one namespace across both rosters, which is what lets every other command take a bare name.

From the Setup tab

Open the Setup tab, pick + new, cycle the type row to codex, and fill the name. + login runs codex's browser login itself (as --browser above) and stages the mint; + capture current login (shown only while your own codex login exists and is uncaptured) stages your ~/.codex login the way --codex does. create account lands the staged login under the name; + login and + capture current login refuse a name either roster already holds on the name row, create account with nothing staged refuses on its own └ line, and a name held by then refuses at create account with a create failed toast. A codex account's Setup row also offers re-login (the same browser login) and delete account (press twice) beside the CLI verbs.

Run

clauth start work              # codex under work's own CODEX_HOME
clauth start work --isolated   # the same login, none of your ~/.codex surfaces

clauth start on a codex name launches codex, not claude. It prints clauth: preparing codex home as it builds the session's home, sets CODEX_HOME to it, and passes two -c overrides before anything you typed: cli_auth_credentials_store="file", so codex reads the linked auth.json rather than a keyring, and sqlite_home=<that home>, so the session's state databases land in it. Anything after the profile name reaches codex verbatim; put -- before a flag both programs spell. Several sessions of one profile can run at once; they share the one chain.

The session home is ~/.clauth/profiles/work/codex-home-<sid>/:

Entry Shared (default) --isolated
auth.json a link to the profile's chain the same link
config.toml, and every *.config.toml layer codex --profile reads copies of the ones in the home your own codex reads with sqlite_home, cli_auth_credentials_store and debug.config_lockfile removed, and the hooks declared inline under [hooks] removed unless the profile sets hooks_json = true, which keeps them and carries your codex's trust for them onto the session home; [hooks.state] always stays. Rewritten from your files at every session start (codex writes its config in place, so it is never a link, and what it writes there lasts until the profile's next session starts; on a host that cannot symlink, that includes a second session starting beside a running one) the same copies, inline hooks always removed
skills, rules, agents, templates, references, AGENTS.md, plugins links to your own codex home's entries absent
hooks.json linked only when the profile's config.toml sets hooks_json = true (copied, on a host that cannot symlink), with your codex's trust for its hooks carried onto the session home's resolved path, so a hook you trusted runs without asking again; a change to hooks_json takes effect at the next session start, also on a host that cannot symlink absent
.credentials.json, mcp-oauth-locks while sync_mcp_logins is on (the default) and the home your own codex reads holds a .credentials.json at the session's start, a hard link to it (its MCP-server OAuth logins) and a link to its mcp-oauth-locks, so a refresh in one session reaches your codex and every other session; a host without symlinks gets neither; the hard links need both homes on one filesystem, else the session runs without them, a first login made in it is not carried at exit, and clauth logs one line. A first login made in the session reaches your codex home at exit when that home holds none by then; a session that crashes loses it. Removing a server's login inside a session stays local when it is the last login there, and reaches every session and your codex home when there are more absent
sessions/, archived_sessions/, history.jsonl, the *.sqlite state stores links into ~/.clauth/profiles/work/codex-home/, the store every session of the profile shares per session, discarded at exit

A thread is in the profile's store the moment codex writes it, so a later session lists it, and archiving one keeps it. The per-session home is removed when the session ends; the store never is.

The environment is scrubbed before the spawn: CODEX_HOME, CODEX_SQLITE_HOME, OPENAI_API_KEY, CODEX_API_KEY, CODEX_ACCESS_TOKEN, CODEX_REFRESH_TOKEN_URL_OVERRIDE, CODEX_REVOKE_TOKEN_URL_OVERRIDE and CODEX_APP_SERVER_LOGIN_CLIENT_ID are dropped, as are the active Claude Code profile's own [env] keys and a CLAUDE_CONFIG_DIR naming a clauth runtime, so the session spends the account it names and nothing inherited. The session carries the home your own codex uses as CLAUTH_OPERATOR_CODEX_HOME — CODEX_HOME when you set one, else nothing — and a process clauth starts from inside the session gets that home back in place of a session CODEX_HOME, so a bare codex there reads your own login; with no home carried, the scrub drops the session CODEX_HOME rather than handing one on.

--with-fallback is refused: --with-fallback is not available on a codex profile: codex reads auth.json once at start, so a chain lands at the NEXT start, not mid-session. Start without the flag. --explain prints would start on 'work' and exits. --auto walks the Claude Code chain and never lands on a codex profile. A chain clauth has declared dead is refused before anything is built (below). failed to launch codex. Is the `codex` CLI installed and on PATH? is what a missing codex looks like.

Inside the session, clauth which prints the profile name, and clauth which --json answers {"profile": "work", "source": "codex_home", "harness": "codex", "tps": null, ...} — tps stays null because token speed reads Claude Code transcripts, never codex's.

Switch

clauth work
# clauth: switched codex to 'work'

A codex switch moves the active marker in codex-profiles.toml. When your own auth.json — under CODEX_HOME when you set one, else under the home a clauth start session carries, else under ~/.codex — is the link clauth installed into a profile's store, the link follows the switch (clauth: /home/you/.codex/auth.json now follows 'work'), so the codex you run yourself uses the account the marker names; a plain file, or a link clauth did not install, is left alone, and so is a ~/.codex link while your codex reads another home. Nothing under ~/.claude moves, and no running session changes account. The marker is what the codex chain anchors on, what the Overview marks, and what status.json publishes as active_codex_profile; clauth start runs any codex profile whether or not it is the active one. A name held on both rosters switches the Claude Code one and says so: clauth: note: 'work' also names a codex profile. This switches the CLAUDE one.

Remove

clauth delete work
# clauth: delete profile 'work' and all its credentials? [y/N]

The same gate as a Claude Code delete: --yes skips the prompt and is required on a non-TTY stdin or stdout (refusing to delete 'work' without confirmation; pass --yes for a non-interactive delete), --force is the only way past 'work' has a live session, pass --force to remove it anyway, and anything but y or yes leaves it with clauth: aborted. 'work' left in place. A confirmed delete removes ~/.clauth/profiles/work/ whole, the profile's threads and state stores under codex-home/ included, then drops the roster row, and prints clauth: removed codex profile 'work'. The Setup tab's delete account row runs the same delete behind a two-press confirm and refuses an account with a live session (there is no --force here).

When your own auth.json — under the home your codex reads, or under ~/.codex — is the link a capture installed onto this profile, the delete removes that link too and says what that means:

clauth: /home/you/alt-codex/auth.json followed that profile's chain and is detached now, so your own codex has no login; run `codex login` to mint a fresh one
clauth: /home/you/.codex/auth.json followed that profile's chain and is detached now too
clauth: /home/you/.codex/auth.json followed that profile's chain and is detached now; your own codex reads /home/you/alt-codex and is unaffected

The first line is your own codex's home, logged out from that moment; the second is ~/.codex detached in the same delete as that home; the third is ~/.codex alone while your codex reads another home, which keeps its login.

A link onto another profile, or a real file (you logged your own codex back in), is left as it is.

Auto-switch

The codex chain is separate from the Claude Code one and lives in ~/.clauth/codex-profiles.toml, hand-edited: fallback_chain in walk order, wrap_off, and its own weekly_switch_threshold (Configuration); clauth edits the file in place, so comments, key order and any key clauth does not model survive its saves. It is walked with the same rules (Auto-switch): the active codex profile has to be a chain member, it has to be exhausted (5h past 95%, or the weekly window past the codex file's line) or dead, and the walk takes the next member with headroom, preferring one whose usage was read live. A dead member is one whose chain clauth has quarantined, or whose usage polls keep answering 401 past two forced refreshes.

What differs is when the switch lands. codex reads auth.json once at start, so a switch moves the active marker and takes effect at the next clauth start; a running session finishes on the account it started with. codex 0.157 and later run every task inside one shared app-server daemon (codex app-server --managed-daemon), and codex resume reconnects to it, so a switch reaches those tasks only once that daemon restarts: it read the login when it started. When a switch moves clauth's auth.json link, clauth checks the codex home whose link it moved (under CODEX_HOME when you set one, else under the home a clauth start session carries, else ~/.codex) for a daemon that started at or before the move. A hand switch prints how to restart it (codex app-server daemon restart, which stops running tasks' current turn and leaves them resumable); an auto-switch that moves the link off an account the chain judged spent or dead restarts the daemon itself (clauth: restarted codex's app-server daemon (…)), one restart at a time. The check needs the daemon's unix control socket, so on Windows clauth neither prints the note nor restarts anything. A stale daemon never writes its old login into the new account's store: codex re-reads auth.json before every refresh and refuses on an account mismatch, so it errors once its token expires instead. The daemon log reads clauth: codex auto-switched to '<name>'. Live at the next codex session, or . Restarting codex's app-server daemon so its tasks resume on it when it restarts one. With wrap_off = true and every member spent, the active slot is cleared once the active account itself is at 100% of its weekly window or past 95% of its 5h window (clauth: every codex account is spent. Codex active slot cleared), and that switch-off is recorded in codex-profiles.toml. While the record stands, once a usage reading (fetched by a running daemon or an open TUI, or cached within one refresh interval) shows a chain member's window recovered, the next codex poll re-arms the slot onto the first such member in chain order that is not dead, as an auto-switch with the same log line, and clauth switch <name> picks a member by hand before then. A switch that moves the active slot, deleting the active codex profile, or a capture that stores a login ends the record; re-capturing the account the auth.json link still follows stores nothing and ends nothing, and a hand edit of active_profile does not end it either. An empty slot with no record behind it, such as the one deleting the active codex profile leaves, stays empty until clauth switch <name>.

Usage and refresh

The refresh loop, an open TUI or clauth daemon, whichever holds the fetch lease, polls each codex profile's usage once per refresh interval from ChatGPT's usage endpoint, using the profile's own chain. The two windows it reports fill the Overview's 5h and 7d columns and status.json's windows[]; when the server reports the account as blocked, the fuller window reads 100% whatever its own percentage says. The plan cell is the ChatGPT plan word the account reports. The Usage tab lists codex accounts in their own codex section, with a detail pane per account: its plan, a re-login pill while its chain is quarantined, any banked resets, how long ago its usage was read, and its 5h and 7d bars (Interface and keys). r on a codex row does nothing; codex usage refreshes on the refresh interval alone.

The same loop rotates a profile's chain ten minutes before its access token expires, under three rules:

  • No replay. A refresh token works once. A failed refresh is never retried with the same token on the routine pass; the token clauth last spent is remembered in auth.attempt, which survives a restart. A usage poll answered 401 buys one forced attempt past that memo, and after two such attempts in a row clauth stops forcing until a poll succeeds again.
  • Stand down for a live session. Inside the five minutes before expiry codex refreshes on its own, and a running session that holds the chain gets that window to itself. On a host without symlinks the session holds a separate copy, so clauth stands down for the whole session.
  • Keep a last-known-good copy. Every well-formed read of the store is copied to auth.lkg.json; the copy is restored only after the store reads unreadable for 30 seconds with no session live, logged as clauth: '<name>' codex auth.json read bad for <n>s. Restored the last-known-good copy.

A landed rotation logs clauth: rotated codex chain for '<name>'; a failed one, clauth: codex refresh for '<name>' failed: <why>.

When a chain dies

A verdict the server calls final quarantines the chain. From then on the Overview row carries ×, status.json reports auth_status: "broken", the chain walk skips the member, and clauth start or a switch onto it refuses with:

'work': codex chain is broken (<kind> since <time>), run `clauth login work --codex --browser`
Kind Meaning
reused the refresh token had already been spent: a second copy of the chain refreshed first, or a reply was lost
expired the chain aged out on the server
invalidated the chain was revoked on the server side
lost clauth's own verdict: the server accepted a rotation, but the new pair could not be written to the store, so the token the store holds is spent (clauth: '<name>' codex rotation succeeded on the wire but the store write failed (<why>); the chain is spent, run `clauth login <name> --codex --browser` )

No refresh revives a dead chain; a new login is the only exit, and the browser form is the one that works for every profile (a re-capture finds ~/.codex/auth.json already pointing at the profile and captures nothing). The Setup tab's codex detail shows the same verdict as a login [ needs re-login ] pill while the chain is quarantined, with re-login running the browser form. The verdict is bound to the token it judged, so a fresh chain clears it however it lands. A refusal the server does not spell out about the chain itself (an unrecognized 4xx) never quarantines: those keep the no-replay memo and the two forced retries and nothing more.

Use a usage-limit reset

A ChatGPT account can hold banked usage-limit resets, the ones codex's own /usage menu offers: spending one reopens the account's 5h and weekly windows at once. A Claude Code account's resets are below. The usage poll reads how many an account holds (the Overview's codex row shows the count while one is available); listing them and spending one are commands you run, and nothing picks a reset for you:

clauth limit-reset work            # the account's resets as a table; spends nothing (--list does the same)
clauth limit-reset work credit-1   # spend the reset that id names, after a [y/N]

The listing prints the count, then a table with one row per reset in the order the server sends them: its ID (the one a spend takes), LEFT (1/1 while it can be used, 0/1 after), STATE (ready for an available reset, any other status as sent, cut to 20 cells, - when it sends none), RESETS (usage windows, or another reset type as sent), EXPIRES in local time (no expiry when it has none) and LABEL (its title cut to 44 cells with ..., or usage-limit reset). Each column is as wide as its widest cell, and the whole table is plain ASCII:

clauth: 'work' has 2 usage-limit resets available.

  ID        LEFT  STATE  RESETS         EXPIRES           LABEL
  credit-1  1/1   ready  usage windows  2026-10-01 09:00  Full reset (Weekly + 5 hr)
  credit-2  1/1   ready  usage windows  no expiry         usage-limit reset

A spend asks before it sends anything that spends:

clauth: use a usage-limit reset on 'work'? Full reset (Weekly + 5 hr), expires 2026-10-01 09:00:00, 1 of 2 available. It reopens the account's usage windows now and cannot be undone. [y/N]

An untitled reset has no title to name, so its question opens on its expiry:

clauth: use a usage-limit reset on 'work'? No expiry, 1 of 1 available. It reopens the account's usage windows now and cannot be undone. [y/N]

--yes (-y) skips the question and is required to spend on a non-TTY stdin or stdout, where the command otherwise stops before any request with refusing to use a reset on 'work' without confirmation; pass --yes; it needs an id, since without one nothing is spent. Anything but y or yes sends nothing: a first spend prints clauth: aborted. no reset was used on 'work'., a declined re-send clauth: aborted. the earlier reset request on 'work' was not re-sent; its outcome is still unknown.

Outcome What it prints Exit
used clauth: used a usage-limit reset on 'work': 2 windows reopened, 1 left., then clauth: the daemon shows the new usage at its next poll. 0
nothing to reset there is nothing to reset on 'work' right now, so no reset was used 1
none held no usage-limit resets available on 'work' (the listing prints it as clauth: no usage-limit resets available on 'work'. and exits 0) 1
an id the list does not name 'work' has no usage-limit reset with the id "credit-9", so no reset was used; run `clauth limit-reset work` to list its resets (nothing is sent) 1
a reset that cannot be used now the usage-limit reset "credit-2" on 'work' cannot be used now (redeemed), so no reset was used (its STATE; nothing is sent) 1
taken meanwhile that reset on 'work' is no longer available (used or expired meanwhile); run `clauth limit-reset work --list` to see what is left 1
token refused codex rejected the stored access token for 'work'. The daemon refreshes it for a parked account and codex does for the one in use. Try again after that. No reset was used 1
no answer the reset request for 'work' got no answer, so the reset may or may not have gone through; a re-run before <time> re-sends the same request (<time> is 10 minutes after the spend, in local time) 1
an answer clauth cannot read codex answered the reset request for 'work' in a shape clauth does not read, so the reset may or may not have gone through; a re-run before <time> re-sends the same request 1

Nothing is retried on its own, since a lost answer may still have spent the reset: a spend whose outcome stays unknown (no answer, a 5xx, or a reply clauth cannot read or that leaves the outcome open) leaves a record, the listing names it (clauth: a usage-limit reset sent at <time> got no answer; run `clauth limit-reset work credit-1` before <time> to re-send it.), and naming that id again within 10 minutes of that spend re-sends that same request instead of spending another reset. Until then no other reset is spent: naming another id stops before any request with a usage-limit reset sent at <time> on 'work' got no answer; run `clauth limit-reset work credit-1` before <time> to re-send it, no other reset is used until then (exit 1). Two runs on one account never spend at once, whichever roster the account is on: a second spend on that account prints clauth: another limit-reset on 'work' is running; waiting for it. and waits, even while the first sits at its [y/N]; it then decides on what the first left, so a record still inside its 10 minutes is re-sent when it names the same id (behind its own [y/N] unless --yes) and refused when it names another. A listing never waits, and neither does a run refused before the lock (no --yes on a non-TTY stdin or stdout, no login, a quarantined chain). Each list read is kept as the account's limit_resets.json, which the TUI names every reset from, and a spend that reset reads the list again. The daemon reads the list itself about once an hour per codex account (the claude side read's cadence), so the rail and the modal show the account's credits without a listing first; the same refusals a listing runs (a quarantined chain, no stored login) skip the read. The command reads the profile's stored login as it stands and never refreshes it (the chain has one writer), and it refuses a quarantined chain the way a start does.

A Claude Code account

The samples above are a codex account's. A Claude Code account's resets go through the same commands and the same table, each grant under the id a spend of it takes; any grant the server lists can be named, not only the one it would spend next. The count reads the resets a spend can use now, against the ones held when some cannot (2/3). LEFT counts the grant's resets left against its total; STATE reads ready while the server marks it usable and its id is one a spend sends, unavailable for a usable grant whose id is not, used once it holds none, cooldown <time left> for any other held grant while the account's resets cool down after a spend (cooldown 4h 46m), then paused, at limit only for a grant usable only at a limit the account is under, else the server's own reason cut to 20 cells, else unavailable; RESETS names the windows it resets (5h, 7d, 7d opus, 7d sonnet, 7d fable, any other as the server sends it, control characters dropped, cut to 40 cells; - when it names none); EXPIRES is its end in local time (- when it has none); LABEL its label cut to 44 cells with ..., control characters dropped:

clauth: 'home' has 3 limit resets available.

  ID                     LEFT  STATE  RESETS        EXPIRES           LABEL
  full-reset-2611        1/1   ready  7d, 7d fable  2026-12-10 23:00  One full limit reset (November 2026)
  launch-2610-fable      1/1   ready  7d fable      2027-03-09 08:59  New model launch: one Fable reset for Max...
  launch-2610-fable-6mo  1/1   ready  7d fable      2027-03-09 08:59  New model launch: one more Fable reset at...

With no grant listed, the listing prints clauth: no limit resets available on 'home'., with the server's reason in parentheses before the period when it gives one (clauth: no limit resets available on 'home' (no_grant).). A spend refuses before anything is sent an id the read does not list ('home' has no limit reset with the id "g-gone", so no reset was used; run `clauth limit-reset home` to list its resets) and a listed grant the server does not mark usable now, naming its STATE (the limit reset "g-cool" on 'home' cannot be used now (cooldown 4h 46m), so no reset was used). The server can still refuse a grant it lists; its reason then prints the way every refusal in its reply does (that limit reset on 'home' is unavailable (<reason>), so no reset was used) and nothing is spent.

A spend's question names the grant, its label cut to 40 cells (an untitled one asks use a limit reset on 'home'?) and the resets it holds; short of a limit it adds the most headroom left in a window it resets ('home' still has 60% of its 7d left.), and when the server names the weekly reset it closes on The weekly reset stays <time>.:

clauth: use the limit reset "One full limit reset (November 2026)" on 'home'? It resets 7d and 7d fable now and cannot be undone; 1 available on it. [y/N]

Managed config

Before every codex start clauth reads /etc/codex/managed_config.toml, the file codex lets an administrator use to outrank a session's own flags. A cli_auth_credentials_store there other than "file" refuses the start, because codex would ignore the session's linked auth.json; a debug.config_lockfile.load_path refuses it, because codex would replay that lockfile as its whole config and drop the file store; a sqlite_home starts the session with a warning, since every profile's state databases then land in that one directory. Both refusals say what to do (ask whoever manages this machine to remove the key) and why (clauth cannot override a managed config). On macOS codex can also take a managed config from an MDM profile; clauth does not read that one, so a key delivered that way is not caught before the spawn. On Windows codex reads its managed config from inside CODEX_HOME, which the session home never holds.

When something is refused

Refusal What to do
the operator codex does not keep its login in auth.json (cli_auth_credentials_store = "<mode>" in <home>/config.toml), so there is nothing current to capture there set that key to "file" in your ~/.codex/config.toml, run codex login, capture again
no codex login to capture: <path> does not exist. Run `codex login` first log your own codex in first
failed to parse <path>: codex writes this file in place, so a login caught mid-write reads half-written. Re-run the capture run it again
<path> holds no ChatGPT token chain (an API-key-only setup?). Only a `codex login` chain can be captured this setup has no chain; log in with codex login
clauth: <path> already follows codex profile '<name>'. Nothing to capture not a refusal: that login is already this profile
<path> is already captured as codex profile '<other>': one chain, one profile. the slot is another profile's link; the line names the steps (remove the link, codex login, capture into the new name)
CODEX_HOME points into a clauth codex session home. Run the capture from a shell outside `clauth start` run it from a shell that is not inside a clauth codex session
'<name>' has a live codex session, which holds the chain this capture would replace. Close it first close that session
'<name>' has a live codex session. Close it before re-authenticating the browser form's spelling of the same
'<name>': codex chain is broken (<kind> since <time>), run `clauth login <name> --codex --browser` the browser login
'<name>' is a codex profile; <verb> is claude-only disable, enable, rename, rolling-token and static-token take Claude Code profiles alone
'<name>' has no stored codex login to use a reset with; run `clauth login <name> --codex --browser` the profile's auth.json is missing, unreadable, or holds no access token
clauth: could not repoint <path> (no symlink support?). It is now a SEPARATE copy of a single-use rotating chain a host without symlinks: run codex only through clauth start <name> from then on, or codex login again for your own use

Files

Path Holds
~/.clauth/codex-profiles.toml the codex roster: active_profile, profiles, fallback_chain, wrap_off, weekly_switch_threshold, and [ids] (written by clauth, one per profile; leave it as written); clauth edits the file in place, so comments, key order and any key clauth does not model survive its saves
~/.clauth/profiles/<name>/auth.json the chain, owner-only, written atomically by clauth and in place by codex through the links
~/.clauth/profiles/<name>/config.toml harness = "codex", plus hooks_json when you set it
~/.clauth/profiles/<name>/auth.lkg.json the last-known-good copy of the chain
~/.clauth/profiles/<name>/auth.attempt the no-replay memo: a fingerprint of the refresh token last sent, never the token
~/.clauth/profiles/<name>/auth.quarantine.json the verdict that killed the chain, its time, and the judged token's fingerprint
~/.clauth/profiles/<name>/usage_cache.json the last usage reading and plan
~/.clauth/profiles/<name>/codex-home/ the durable store: sessions/, archived_sessions/, history.jsonl, the sqlite state stores
~/.clauth/profiles/<name>/codex-home-<sid>/, codex-home-isolated-<sid>/ one live session's CODEX_HOME, removed at exit
~/.clauth/profiles/<name>/sessions-<sid>/, sessions-isolated-<sid>/ that session's PID file, flock-held while it runs
your own codex home's auth.json after a capture, a symlink onto the profile's auth.json (the home $CODEX_HOME names when you set one, else the home a clauth start session carries, else ~/.codex)

Everything under ~/.clauth is owner-only, as on the Security page. Your own codex home's config.toml is copied into sessions and never written back.

What stays Claude Code only

The Tokens tab and clauth sessions / resume / info read Claude Code's transcript stores; a codex session writes none, so its spend is absent from every figure there rather than folded in; clauth sessions --live still lists a running codex session, with codex as its harness and no transcript id, and clauth switch <sid> <profile> refuses it as session '<sid>' is a codex session; switch is claude-only. clauth list shows codex accounts in their own CODEX section under the Claude Code table (plan, 5h, 7d, (login expired) on a quarantined chain), and clauth status --json and the daemon's status.json carry codex entries with "harness": "codex" (Daemon). The Claude Code plugin's profiles, switch_profile and delegate refuse a codex name as a codex account they do not manage (Claude Code plugin). disable, enable, rename, rolling-token and static-token refuse one as '<name>' is a codex profile; <verb> is claude-only. Fallback lists no codex rows; Usage lists them in their own codex section. Setup lists every codex account after the Claude Code ones: ⏎ opens its detail pane — type and plan, a login [ needs re-login ] row while the chain is quarantined — with re-login (the browser login of clauth login <name> --codex --browser: r opens the browser again, c copies the link) and delete account (the delete of clauth delete <name> behind the two-press arm; a live session still refuses). Setup's + new → type codex creates one (Add an account); the shell verbs are the other way in.

On the Overview, codex accounts sit in selectable rows under the Claude Code rows; ↑ and ↓ reach each one, but ⏎ cannot switch a codex account and a offers tab-wide actions only. c cycles which harness the tab shows (Interface and keys).

Windows and hosts without symlinks

Where clauth cannot create symlinks (Windows without the symlink privilege, or a home on exFAT, FAT32 or SMB), a session home holds a copy of auth.json instead of a link, converged with the profile's store at every session start and exit, with the later last_refresh winning. That copy is a second carrier of a single-use chain, so on such a host clauth stands its refresh down for the whole session, refuses a shared and an isolated session of one profile at the same time, and the capture keeps your own codex home's auth.json as a separate copy with a warning: run codex only through clauth start <name> from then on.

Clone this wiki locally