#7465·cc-switch

[Bug] Malformed Codex managed OAuth marker can block provider switching

Author: SIMON-WORLDCreated Sep 17, 2026Updated Sep 17, 2026

Version

v3.20.3

Operating System

Windows

Affected App

Codex

Steps to Reproduce

  1. Use a valid managed ChatGPT OAuth account with an Official Codex provider.
  2. Keep the native Codex auth.json valid.
  3. Make codex_managed_oauth_live_auth.json contain malformed JSON.
  4. Switch from the Official provider to another Codex provider.

The switch fails with an error like:

JSON parse error: ...codex_managed_oauth_live_auth.json: expected value at line 1 column 1

With CC Switch fully stopped, moving only the malformed marker aside and restarting restores the Official account state and provider switching.

Expected Behavior

A malformed ownership marker should not block provider switching. It should be treated as unable to prove managed credential ownership.

Actual Behavior

Current main propagates the marker parse error through:

prepare_live_auth_for_account_switch_awayread_managed_live_auth_refresh_for_accountread_codex_live_auth_refresh_for_managed_accountmigrate_legacy_codex_managed_oauth_live_auth_markerread_json_file(marker)?

Other marker-handling paths already treat an unreadable marker as unable to establish ownership.

Related Issue

#7232 covers a missing marker; this bug requires an existing malformed marker.

Also present in current main at: 06082e189d65e6d6dbadc35dacdac1ce6c79d89a