Skip to content

Cannot restore from existing provider auth: Codex auth.json missing

Quick fix

Upgrade to v3.13.0 if local auth.json is missing but provider auth exists. Empty auth in sync or SQL exports has no verified fix.

Error output
这时如果执行 Codex provider switch 或读取 live 配置,系统不会用已有的 provider auth 来恢复 live auth,结果就是切换失败,或者 live 状态不完整。
English translation

When executing Codex provider switch or reading the live configuration in this state, the system does not use existing provider auth to restore live auth. This causes the switch to fail or leaves the live state incomplete.

In the multi-device / WebDAV sync scenario in #1910, the new machine already had provider auth, but local `~/.codex/auth.json` did not exist. Switching providers or reading the live configuration did not use the existing credentials to restore live auth. The maintainer confirmed that Provider Key Lifecycle & Live Sync in v3.13.0 fixed this issue, allowing existing provider auth to restore live auth and complete the switch.

#561 reports a separate variant: configuration does not sync promptly, and auth.json for newly added providers is often empty in exported .sql files. The reporter suspected SQLite caching as the main cause, but the thread did not verify this or confirm that v3.13.0 fixed this variant. Although the issue is closed, the original thread provides no verified fix.

  1. First identify where authentication is missing: the confirmed fix for #1910 applies when the provider configuration already contains valid auth but local ~/.codex/auth.json does not exist.

  2. For this case, upgrade to v3.13.0, then execute Codex provider switch / sync-to-live. Verify that live auth is restored and the provider switch completes. The maintainer confirmed that this version includes the fix.

  3. If restoration still fails after upgrading, reopen #1910 as the maintainer suggested and report your verification results.

  4. If WebDAV configuration sync is delayed or auth.json for newly added providers is empty in exported .sql files, follow #561 for updates. The original thread provides no verified fix.

ToolCodex
Versionv3.13.0(修复版本,仅确认修复 #1910)
PlatformsUnknown

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.