Skip to content

Commit 347fc1a

Browse files
committed
chore(release): prepare v0.1.3 switch sync hotfix
Release v0.1.3 with local switch success when Codex host sync is unavailable.\n\nCo-authored-by: Codex <noreply@openai.com>
1 parent 7de265a commit 347fc1a

8 files changed

Lines changed: 89 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ Dates use ISO format (`YYYY-MM-DD`).
55

66
This repository's canonical public release line is currently `0.x`.
77

8+
## [0.1.3] - 2026-03-03
9+
10+
### Fixed
11+
12+
- `codex auth switch <index>` now succeeds locally even when Codex host-state sync is unavailable.
13+
- Removed false-negative switch failures in environments where Codex no longer exposes JSON sync files (`accounts.json` / `auth.json`).
14+
- Clarified switch output to explicitly state local multi-auth routing remains active when host sync cannot be completed.
15+
16+
### Added
17+
18+
- CLI regression coverage for local-switch success when Codex auth sync returns unavailable/failure.
19+
820
## [0.1.2] - 2026-03-03
921

1022
### Fixed
@@ -85,3 +97,4 @@ Historical entries from pre-`0.1.0` internal iteration cycles are preserved in:
8597
[0.1.0]: https://github.com/ndycode/codex-multi-auth/releases/tag/v0.1.0
8698
[0.1.1]: https://github.com/ndycode/codex-multi-auth/releases/tag/v0.1.1
8799
[0.1.2]: https://github.com/ndycode/codex-multi-auth/releases/tag/v0.1.2
100+
[0.1.3]: https://github.com/ndycode/codex-multi-auth/releases/tag/v0.1.3

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ codex auth doctor --json
268268

269269
## Release Notes
270270

271-
- Current stable: [docs/releases/v0.1.2.md](docs/releases/v0.1.2.md)
272-
- Previous stable: [docs/releases/v0.1.1.md](docs/releases/v0.1.1.md)
273-
- Earlier stable: [docs/releases/v0.1.0.md](docs/releases/v0.1.0.md)
271+
- Current stable: [docs/releases/v0.1.3.md](docs/releases/v0.1.3.md)
272+
- Previous stable: [docs/releases/v0.1.2.md](docs/releases/v0.1.2.md)
273+
- Earlier stable: [docs/releases/v0.1.1.md](docs/releases/v0.1.1.md)
274274
- Archived prerelease: [docs/releases/v0.1.0-beta.0.md](docs/releases/v0.1.0-beta.0.md)
275275

276276
## License

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Canonical documentation map for `codex-multi-auth`.
2424
| [troubleshooting.md](troubleshooting.md) | Deterministic recovery playbooks |
2525
| [privacy.md](privacy.md) | Data handling and local storage behavior |
2626
| [upgrade.md](upgrade.md) | Migration from legacy package/path history |
27-
| [releases/v0.1.2.md](releases/v0.1.2.md) | Stable release notes |
28-
| [releases/v0.1.1.md](releases/v0.1.1.md) | Previous stable release notes |
29-
| [releases/v0.1.0.md](releases/v0.1.0.md) | Earlier stable release notes |
27+
| [releases/v0.1.3.md](releases/v0.1.3.md) | Stable release notes |
28+
| [releases/v0.1.2.md](releases/v0.1.2.md) | Previous stable release notes |
29+
| [releases/v0.1.1.md](releases/v0.1.1.md) | Earlier stable release notes |
3030
| [releases/v0.1.0-beta.0.md](releases/v0.1.0-beta.0.md) | Archived prerelease notes |
3131

3232
---
@@ -38,7 +38,7 @@ Canonical documentation map for `codex-multi-auth`.
3838
| [reference/commands.md](reference/commands.md) | Commands, flags, and hotkeys |
3939
| [reference/settings.md](reference/settings.md) | Dashboard/backend settings and defaults |
4040
| [reference/storage-paths.md](reference/storage-paths.md) | Canonical and compatibility storage paths |
41-
| [releases/v0.1.2.md](releases/v0.1.2.md) | Current stable release notes |
41+
| [releases/v0.1.3.md](releases/v0.1.3.md) | Current stable release notes |
4242
| [releases/v0.1.0-beta.0.md](releases/v0.1.0-beta.0.md) | Archived prerelease reference |
4343
| [releases/legacy-pre-0.1-history.md](releases/legacy-pre-0.1-history.md) | Archived pre-0.1 changelog history |
4444

docs/releases/v0.1.3.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Release v0.1.3
2+
3+
Release date: 2026-03-03
4+
Channel: `latest`
5+
6+
## Highlights
7+
8+
- Fixed `codex auth switch <index>` so local account switching remains successful even when Codex host-state sync is unavailable.
9+
- Removed false failure messaging tied to missing host JSON auth artifacts in newer Codex runtimes.
10+
- Clarified switch messaging so operators can distinguish local multi-auth success from optional host-state sync.
11+
- Added regression coverage to lock local-switch behavior when Codex sync writes return unavailable/failure.
12+
13+
## Install
14+
15+
```bash
16+
npm i -g @openai/codex
17+
npm i -g codex-multi-auth
18+
```
19+
20+
## Core Operations
21+
22+
```bash
23+
codex auth login
24+
codex auth list
25+
codex auth switch 2
26+
codex auth check
27+
codex auth forecast --live
28+
```
29+
30+
## Validation Snapshot
31+
32+
Release gate commands:
33+
34+
- `npm run typecheck`
35+
- `npm run test -- test/codex-manager-cli.test.ts`
36+
37+
## Merged PRs
38+
39+
- None (direct patch release on `main`).
40+
41+
## Commits
42+
43+
- Included in release tag `v0.1.3`.
44+
45+
## Notes
46+
47+
- Local multi-auth routing remains the source of truth for account selection.
48+
- Host Codex session identity shown by `/status` can differ from the plugin-selected account pool.
49+
- Canonical runtime paths remain under `~/.codex/multi-auth`.
50+
51+
## Related
52+
53+
- [../getting-started.md](../getting-started.md)
54+
- [../upgrade.md](../upgrade.md)
55+
- [../reference/commands.md](../reference/commands.md)

lib/codex-manager.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3699,10 +3699,9 @@ async function runSwitch(args: string[]): Promise<number> {
36993699
expiresAt: account.expiresAt,
37003700
});
37013701
if (!synced) {
3702-
console.error(
3703-
`Switch failed: account ${parsed} was selected locally but Codex auth sync failed. Run \"Refresh login for this account\" and retry.`,
3702+
console.warn(
3703+
`Switched account ${parsed} locally, but Codex auth sync did not complete. Multi-auth routing will still use this account.`,
37043704
);
3705-
return 1;
37063705
}
37073706

37083707
console.log(

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codex-multi-auth",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "OpenAI Codex CLI multi-account OAuth manager with resilient routing and quota-aware diagnostics",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

test/codex-manager-cli.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ describe("codex manager cli commands", () => {
551551
expect(payload.recommendedSwitchCommand).toBe("codex auth switch 2");
552552
});
553553

554-
it("fails switch when Codex auth sync fails", async () => {
554+
it("keeps local switch when Codex auth sync fails", async () => {
555555
const now = Date.now();
556556
loadAccountsMock.mockResolvedValueOnce({
557557
version: 3,
@@ -570,14 +570,18 @@ describe("codex manager cli commands", () => {
570570
],
571571
});
572572
setCodexCliActiveSelectionMock.mockResolvedValueOnce(false);
573-
const errorSpy = vi.spyOn(console, "error").mockImplementation(() => {});
573+
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
574+
const logSpy = vi.spyOn(console, "log").mockImplementation(() => {});
574575
const { runCodexMultiAuthCli } = await import("../lib/codex-manager.js");
575576

576577
const exitCode = await runCodexMultiAuthCli(["auth", "switch", "1"]);
577-
expect(exitCode).toBe(1);
578+
expect(exitCode).toBe(0);
578579
expect(saveAccountsMock).toHaveBeenCalledTimes(1);
579-
expect(errorSpy).toHaveBeenCalledWith(
580-
expect.stringContaining("Codex auth sync failed"),
580+
expect(warnSpy).toHaveBeenCalledWith(
581+
expect.stringContaining("Codex auth sync did not complete"),
582+
);
583+
expect(logSpy).toHaveBeenCalledWith(
584+
expect.stringContaining("Switched to account 1"),
581585
);
582586
});
583587

0 commit comments

Comments
 (0)