v2.3.0-beta.1.md
June 7, 2026 · View on GitHub
Account Login
Bugfixes
- Stopped
codex-multi-auth loginfrom always printingAdded accountwhen a same-email / different-workspace login folded onto an existing saved entry. The CLI login path used local copies ofresolveAccountSelectionandpersistAccountPoolinlib/codex-manager.tsthat had drifted from the workspace-aware versions inlib/runtime/(added for #491 and used only by the runtime proxy); the CLI copies never persistedworkspacesand unconditionally reportedAdded account. The login flow now reports the real outcome —Added account,Updated existing account, orRebound workspace for existing account— based on whether the write inserted a new entry, refreshed an existing one, or surfaced a previously-untracked workspace (issue #512). - Persisted token-derived workspaces on the saved account so
codex-multi-auth workspace <account>is usable after a same-email multi-workspace login. Rows no longer save withworkspaces: null; per-workspaceenabled/disabledAtstate is preserved across re-logins, and the explicitlogin --org <id>binding now tracks workspaces too (previously the override path returned before workspace discovery). - Classified the first workspace-aware re-login of a pre-#491 account (one with
no tracked workspaces yet) as
Updated existing accountrather thanRebound workspace, so quiet first-time enrichment is not mislabeled as a rebind.
Manual sign-in
- Surfaced real validation errors from
codex-multi-auth login --manualinstead of reporting every failure asCancelled.. The manual callback reader returnednullfor a genuine user cancel, a callback URL missing the code/state parameter, and an OAuth state mismatch alike, and the caller treated all three as a cancellation. A new pure classifier (classifyManualCallbackInput) distinguishescode/cancelled/invalid/state-mismatch;invalidandstate-mismatchnow exit non-zero with a specific, actionable message (callbackInvalid/callbackStateMismatch), while a genuine cancellation is unchanged (issue #512 follow-up).
Release Hygiene
Tests
- Extracted the account-pool fold (dedup → insert/update/rebound →
workspace-tracking → active-index) into pure helpers
(
applyAccountPoolResults,buildInsertedAccount,buildUpdatedAccount,mergeAccountWorkspaces,resolveCurrentWorkspaceIndex) and covered them with unit tests, including an end-to-end reproduction of the same-email multi-workspace scenario driven through the realfindMatchingAccountIndexdedup strategy. - Added CLI regressions:
login --org <id>persists workspace tracking, a mismatched manual-callback state exits non-zero with the state-mismatch message, and a malformed manual-callback URL exits non-zero with thecallbackInvalidmessage — none of which persist an account. - Full classifier coverage for the manual-callback contract, including the reporter's "pasted a localhost callback URL but still saw Cancelled" case.
Notes
- Prerelease published under the
betadist-tag (npm i -g codex-multi-auth@beta). This is a bugfix beta on the 2.3.0 line; the #509 sequential drain-first feature from2.3.0-beta.0is unchanged.