Releases: ndycode/codex-multi-auth
Releases · ndycode/codex-multi-auth
v2.1.10
Runtime Rotation
Bugfixes
- Runtime pool exhaustion on
no-accountnow resets volatile runtime trackers, reloads accounts from disk once, and retries selection even when stale in-memory circuit breakers are open. This prevents a long-lived proxy from staying wedged after disk state has recovered. - Runtime proxy shutdown now flushes only the active account manager after a stale-state reload, avoiding stale-vs-fresh manager save races during close.
- Pinned-account hard-fail behavior remains preserved: unavailable pinned accounts still return the explicit pinned-account error instead of silently rotating.
Diagnostics
Improvements
- Pool-exhausted 503 responses include per-account runtime skip reasons and a targeted recovery hint.
reportanddoctornow include persisted quota-cache inputs when computing forecast readiness, so quota-exhausted cache state cannot be reported as ready by those diagnostics.doctorkeeps theforecast-runtime-alignmentwarning for disk/runtime divergence.rotation reset-runtime --jsonno longer clears runtime diagnostics if the app bind restart fails, preserving evidence needed for follow-up diagnosis.
Release Hygiene
Improvements
- The npm package now includes only runtime/install scripts instead of internal benchmark, audit, and maintenance scripts.
- Production dependency patch lines were refreshed (
undiciandzod) while keeping the published package on the current Node 18-compatible runtime line. - Release index labels were corrected so older release-note rows are not shown as current stable.
Validation
- Published to npm as
codex-multi-auth@2.1.10. npm run typecheck,npm run lint,npm test,npm run build,npm run pack:check, and productionnpm auditpassed on the release checkout.- Fresh npm install smoke verified
codex-multi-auth@2.1.10command/version/help/doctor/forecast/report/reset-runtime paths.
v2.1.9
CLI
Bugfixes
codex-multi-auth login --device-authno longer exits withDetected unsettled top-level awaitbefore the user can complete browser authorization. The polling sleep timer was being unref'd, which is correct for library/background callers but caused Node to exit during the foreground CLI flow. The CLI call site now opts in to a newkeepAliveoption onrunDeviceAuthFlowso the event loop stays alive until polling resolves or the abort signal fires.codex-multi-auth login --device-auth,--manual, and--no-browsernow run the requested transport even when the account pool already has entries. Previously the Accounts Dashboard menu interceptedloginwhenever any account was present, silently ignoring the explicit flag.- Declining
Add another account?after a successful explicit-mode add now exits cleanly. Previously the outerloginFlowloop would re-enter the same transport because the dashboard had been bypassed, trapping the user in a fresh sign-in prompt. - Cancelling an explicit-mode sign-in (for example pressing Ctrl-C during browser/manual auth) now exits cleanly instead of falling back to a fresh transport invocation.
- Reaching
ACCOUNT_LIMITS.MAX_ACCOUNTS(20) during an explicit-mode add now exits cleanly after printing the cap message. Previously the outer loop would silently start another sign-in session despite the cap.
Public API
Improvements
DeviceAuthFlowOptionsadds an optionalkeepAlive?: booleanfield. Library and background consumers retain the previous behavior (sleep timers are unref'd so polling does not hold the event loop open). Foreground CLI callers can passkeepAlive: trueto keep the loop alive while polling for completion. Abort handling stays correct in both modes:clearTimeoutruns in the abort listener so the timer ref is always released on cancellation.
v2.1.8
CLI
Improvements
- Added
codex-multi-auth unpinto clear the manual pin set byswitch, bumpaffinityGenerationso the proxy invalidates session affinity on the next request, and resume hybrid rotation. codex-multi-auth statusnow surfaces the pinned account index and warns when the runtime is using a different account than the pin requests.codex-multi-auth switch <index>now writespinnedAccountIndexthat the proxy honors before session affinity, hybrid scoring, and pool fallback;bestclears the pin.
Bugfixes
statusno longer printsPinned: account NaNfor corrupt pins; the guard tightens toNumber.isInteger, shows the raw stored value, and points atunpin.
Runtime Rotation Proxy
Bugfixes
- Runtime rotation proxy now honors manual switch on the Codex Desktop app via a content-hash-keyed per-path read of the storage file; the pinned path is exempt from
markSwitched/saveToDiskDebounced/syncCodexCliActiveSelectionForIndex. - Session affinity no longer locks the desktop app to one account for 20 minutes;
affinityGenerationbumps fromswitch/unpin/besttriggerSessionAffinityStore.clearAll()beforechooseAccount, including for the in-flight request. - When the pinned account is unavailable, the proxy now returns HTTP 503 with
error.code = codex_pinned_account_unavailableinstead of silently rotating. AccountManager.buildStorageSnapshotno longer wipespinnedAccountIndex/affinityGenerationon routine debounced saves; it refreshes from disk before serializing.- Concurrent
affinityGenerationincrements across CLI processes are now atomic viaMath.max(inMemory, disk) + 1. unpinnow usessaveAccountsWithRetryso a transient Windows file lock cannot silently lose the user's intent.- Replaced a synchronous busy-wait in
readStorageMetaFromDiskwith a single read plus per-path content-hash cache fallback that preserves the last snapshot on transient errors. - Runtime rotation proxy storage cache is now a
Map<string, StorageMetaSnapshot>keyed by absolute path, fixing cross-instance and cross-worker pin leakage.
2.1.7
Install / Uninstall
Improvements
- Added
codex-multi-auth uninstall [--dry-run] [--json] [--clear-accounts]that reverses postinstall: unbinds Codex app rotation, removes OS launchers, strips the plugin entry fromCodex.json, clears thenode_modulescache, and conservatively deletes sharedbun.lockonly when no other Codex plugins remain.
Bugfixes
- Removed the dead
preuninstallentry frompackage.jsonbecausenpm@7+no longer runs it; to uninstall fully, runcodex-multi-auth uninstallthennpm uninstall -g codex-multi-auth.scripts/preuninstall.jsis preserved and still callable vianode scripts/preuninstall.js. - Dry-run
uninstallnow computes thebun.lockdecision from the actualCodex.jsonplugin list. --clear-accountswarns and exits non-zero when no handler is wired.- Dry-run uninstall preview no longer requires
scripts/codex-app-launcher.json disk. removePluginFromListpre-filters falsy entries withlist.filter(Boolean).
Core
Bugfixes
hydrateRuntimeEmailsno longer collapses accounts sharingaccountId === undefinedinto the sameMapentry.restoreTopLevelModelProvider/restoreTopLevelResponseStoragenow splice missing keys ahead of the first section header instead of producing invalid TOML.runFix,runHealthCheck, and forecastsaveQuotaCachepaths now downgrade transientEBUSY/EPERMto a partial-success warning viaquotaCacheSaveError.withStorageLocknow initializesreleaseLockas a typed no-op.
Runtime Rotation Proxy
Bugfixes
- App-bind now requires
router.state === "running"and a live PID before reusingexistingState, so a dead router cannot trigger aconfig.tomlrewrite. - Stream-failover read promise is now hoisted before the soft/hard timeout split.
2.1.5
Core
Improvements
- Added manual-only update notices on startup for installed wrappers; no
npm installor global package mutation.
Bugfixes
- Removed package-owned auto-update behavior and detached startup update checks from forwarded Codex launch paths.
- Stabilized update-notice package-root resolution across local Node versions and repo path layouts.
Runtime Rotation Proxy
Improvements
- Added runtime shadow-home isolation for Codex goal, log, and state SQLite files; user config, sessions, plugins, skills, and multi-auth state are preserved.
Bugfixes
thread/goal/getproxy now returns{ "goal": null }for recoverable upstream errors and exhausted account pools instead of noisy Codex TUI goal-read errors.- Hardened runtime shadow-home startup around large or locked Codex
logs_*.sqlite*/state_*.sqlite*files, stale generated dirs, Windows sidecars, casing, and atomic SQLite mirror cleanup.
2.1.4
Runtime Rotation Proxy
Bugfixes
- Codex TUI goal proxy now handles snake-case
thread_idrequest bodies and local blocked-goal fallback responses. - Workspace-disabled and deactivated accounts stay disabled and visible at runtime instead of being hidden by goal fallback.
2.1.3
Runtime Rotation Proxy
Bugfixes
- Wrapper-launched Codex sessions now repair
session_index.jsonlafter known thread-store write noise, with realsession_metaevidence required and concurrent repairs serialized through the shadow-home lock. - App-bind status warnings now resolve the active status path before printing history-visibility and model-speed guidance.
2.1.2
Install / Uninstall
Bugfixes
- Dropped the global
codexbin to avoid npm bin collisions with official Codex npm, native, and Homebrew distributions. codex-multi-auth-codexremains the explicit forwarding wrapper;codex-multi-authremains the account-management command family.
2.1.1
CLI
Bugfixes
- Restored routing for
codex auth usage,account,budget,bridge,integrations,models, andmonitorso they stay in the local multi-auth handler instead of falling through to official Codex. codex auth bridge token list --jsonnow returns valid JSON when the token store is empty and keeps token hashes out of list output.
Core
Bugfixes
- Stabilized retry-suite timers after the routing repair.
2.1.0
Core
Improvements
- Added a local-only JSONL usage ledger, account policy metadata, routing profiles, and budget guards.
- Added model and account capability matrix views with runtime policy evaluation before account selection.
- Added an optional loopback-only bridge with
/health,/v1/models,/v1/responses, and hashed client-token storage.
Bugfixes
- Wrapped remaining
saveAccountscall sites with retry handling. - Redacted proactive-refresh account emails through
maskEmail. - Plugin-config loading now handles non-Error throws.
Runtime Rotation Proxy
Improvements
- Added
rotation reset-rate-limitsto clear stale runtime pool timers.
CLI
Improvements
- Added
codex auth usageandcodex auth monitorfor local usage governance.