codex-multi-auth icon indicating copy to clipboard operation
codex-multi-auth copied to clipboard

[bug] Codex history becomes invisible when rotation is enabled, and model speed cannot be managed

Open Timido-anonybit opened this issue 7 months ago • 3 comments

Summary

When codex-multi-auth runtime rotation is enabled with Codex Desktop app bind, existing local Codex history becomes invisible in the Desktop UI.

The history does not appear to be deleted: rollout files, session_index.jsonl, and SQLite thread records are still present under ~/.codex. The issue looks like a visibility/indexing/provider-filtering problem triggered by enabling rotation.

Also, when the runtime rotation provider is active, there is no obvious way to manage the Codex model speed mode, such as fast / normal, from the Desktop flow or through codex-multi-auth.

Environment

  • OS: macOS 26.4.1
  • codex --version: codex-cli 0.125.0
  • codex-multi-auth --version: 2.1.2
  • Install method: global npm package
  • Runtime rotation: enabled
  • Codex app bind: running
  • Active provider in ~/.codex/config.toml: codex-multi-auth-runtime-proxy

Current Status

codex-multi-auth rotation status reports:

Runtime rotation proxy: enabled
Stored setting: enabled
Env override: none
Codex app bind: running

~/.codex/config.toml contains a runtime rotation provider like this:

model_provider = "codex-multi-auth-runtime-proxy"

[model_providers.codex-multi-auth-runtime-proxy]
base_url = "http://127.0.0.1:<port>"
requires_openai_auth = false
wire_api = "responses"

Evidence That History Is Not Deleted

Local history files still exist:

~/.codex/sessions: rollout files are present
~/.codex/session_index.jsonl: present
~/.codex/state_5.sqlite: threads table contains existing threads

Example local diagnostic:

rollout files: 198
session_index.jsonl lines: 112
state_5.sqlite threads: 208
non-archived threads: 174

So this does not look like data loss. It looks like Codex Desktop stops showing existing history when rotation/app bind switches the active provider to codex-multi-auth-runtime-proxy.

Expected Behavior

  1. Enabling runtime rotation/app bind should not make existing Codex history invisible.
  2. Existing threads should remain visible in Codex Desktop after rotation is enabled.
  3. If this is an upstream Codex Desktop provider-filtering limitation, codex-multi-auth should document it clearly and provide a recommended workaround.
  4. The runtime rotation path should preserve access to model speed controls, such as fast / normal, or expose an equivalent setting in codex-multi-auth.

Actual Behavior

  1. After enabling runtime rotation/app bind, existing Codex history becomes invisible in the Desktop UI.
  2. The local history data still exists on disk and in SQLite.
  3. With the rotation provider active, there is no obvious way to control model speed mode.

Related Upstream Context

This may overlap with Codex Desktop provider/history behavior:

  • https://github.com/openai/codex/issues/20004
  • https://github.com/openai/codex/issues/20184

However, from the codex-multi-auth user perspective, enabling runtime rotation/app bind is the trigger. It would be useful if codex-multi-auth could either work around this, document it clearly, or expose a safe recommended setup.

Timido-anonybit avatar Apr 30 '26 12:04 Timido-anonybit

[!CAUTION] CodeRabbit could not initialize plan tracking. Please try again later.

coderabbitai[bot] avatar Apr 30 '26 12:04 coderabbitai[bot]

I've updated the plan above based on your feedback. Ready to proceed when you are!

coderabbitai[bot] avatar Apr 30 '26 12:04 coderabbitai[bot]

Released v2.1.3 with the app-bind/session-history fix: https://github.com/ndycode/codex-multi-auth/releases/tag/v2.1.3

Please update to the new release and try again. This release adds session-index repair for successful wrapper-launched Codex sessions and prints the explicit Desktop history workaround when app bind is active.

If Codex Desktop still appears to hide older history while app bind is enabled, run one of these to restore the original provider/config before checking history:

codex auth rotation unbind-app

or:

codex auth rotation disable

I also verified the released main state locally with full tests plus real installed-session stress: 6 real codex exec sessions, including parallel runs, all persisted into session_index.jsonl with no new failed to record rollout items / rmcp 404 noise in the captured stress logs.

ndycode avatar Apr 30 '26 17:04 ndycode