[bug] Codex vscode extention doesn't see 5.6 models (although Codex CLI does)
Summary
With codex-multi-auth configured, the Codex VS Code extension does not show the GPT-5.6 model family. Its model picker only shows GPT-5.5, GPT-5.4, and GPT-5.4 mini. In the same local environment, the Codex CLI can access the GPT-5.6 models correctly.
Reproduction
- Install and configure
codex-multi-authwith a personal Codex account. - Confirm the Codex CLI exposes the GPT-5.6 model family.
- Open the Codex VS Code extension and inspect its model picker.
- Observe that GPT-5.6 models are absent; only GPT-5.5, GPT-5.4, and GPT-5.4 mini appear.
Expected Behavior
The Codex VS Code extension should expose the same eligible model families as the Codex CLI when using the same codex-multi-auth configuration and account.
Actual Behavior
The CLI exposes GPT-5.6 models, but the VS Code extension does not show them. The extension only lists GPT-5.5, GPT-5.4, and GPT-5.4 mini.
Environment
codex --version:codex-cli 0.144.1codex-multi-auth statusoutput summary: 2 personal accounts configured; storage health is healthy; Account 1 is selected/pinned; runtime reports 0 responses, 0 refreshes, 11 probes, and 0 budget exhaustions.codex-multi-auth rotation statusoutput summary: runtime rotation proxy enabled; Codex app bind running; 2 accounts available.npm ls -g codex-multi-auth:[email protected]- VS Code:
1.127.0(x64) - Codex VS Code extension version: 26.5707.31428 required.
- OS:
ALT Workstation 11.2 (Prometheus), kernel6.18.38-6.18-alt1 - Node.js:
v22.22.2
Diagnostic Outputs
codex-multi-auth check
Checking 2 account(s) with quick check + live check...
Model probe: gpt-5.5 | prompt family gpt-5.2 | tool search yes | computer use yes
✓ Account 1 | live session OK (5h 52% | 7d 93%)
✓ Account 2 | live session OK (5h 96% | 7d 99%)
Result: 2 Codex available | 0 signed in only | 0 need re-login
### codex-multi-auth report --json
{
"command": "report",
"storageHealth": {
"state": "healthy",
"hasResetMarker": false,
"hasWal": false,
"schemaErrors": []
},
"model": "gpt-5.5",
"modelSelection": {
"requested": "gpt-5.5",
"normalized": "gpt-5.5",
"remapped": false,
"promptFamily": "gpt-5.2",
"capabilities": {
"toolSearch": true,
"computerUse": true,
"compaction": true
}
},
"accounts": {
"total": 2,
"enabled": 2,
"disabled": 0,
"coolingDown": 0,
"rateLimited": 0
},
"forecast": {
"summary": {
"total": 2,
"ready": 2,
"delayed": 0,
"unavailable": 0,
"highRisk": 0
},
"probeErrors": []
},
"runtimeOverlay": true,
"runtime": {
"responsesRequests": 0,
"authRefreshRequests": 0,
"diagnosticProbeRequests": 13,
"lastPoolExhaustionReason": "network-error",
"runtimeMetrics": {
"totalRequests": 0,
"successfulRequests": 0,
"failedRequests": 0,
"rateLimitedResponses": 0,
"serverErrors": 0,
"networkErrors": 0,
"accountRotations": 0
}
}
}
codex-multi-auth doctor --json
{
"command": "doctor",
"summary": {
"ok": 17,
"warn": 0,
"error": 0
},
"checks": [
{ "key": "storage-file", "severity": "ok", "message": "Account storage file found" },
{ "key": "storage-readable", "severity": "ok", "message": "Storage file is readable" },
{ "key": "codex-auth-file", "severity": "ok", "message": "Codex auth file found" },
{ "key": "codex-auth-readable", "severity": "ok", "message": "Codex auth file is readable" },
{ "key": "codex-config-file", "severity": "ok", "message": "Codex config file found" },
{ "key": "codex-auth-store", "severity": "ok", "message": "Codex auth storage is set to file" },
{ "key": "accounts", "severity": "ok", "message": "Loaded 2 account(s)" },
{ "key": "enabled-accounts", "severity": "ok", "message": "2 enabled / 0 disabled" },
{ "key": "duplicate-refresh-token", "severity": "ok", "message": "No duplicate refresh tokens detected" },
{ "key": "duplicate-email", "severity": "ok", "message": "No duplicate emails detected" },
{ "key": "refresh-token-shape", "severity": "ok", "message": "Refresh token format looks normal" },
{ "key": "active-selection-sync", "severity": "ok", "message": "Manager active account and Codex active account are aligned" }
]
}
Logs (Optional)
No logs attached. I can provide sanitized logs if maintainers request them.
Compliance Confirmation
- [x] I am using this project for personal development workflows.
- [x] This report does not request policy bypasses or prohibited usage.
- [x] I removed any secrets/tokens from this report.
Coding Plan
Summary
- root cause is process-lifecycle drift, not model-catalog gating: gpt-5.6 is already first-class in
lib/request/helpers/model-map.tsand/v1/modelsis a transparent pass-through, but the app-bind router is a detached long-lived process that loadsdist/once and never restarts on upgrade, unlike the fresh-per-run cli proxy. - stamp
packageVersion/spawnedAtintoAppBindState/AppBindRouterStatusand make the router reuse guard inlib/runtime/app-bind.tsforce a kill+respawn on version drift. - surface staleness via
rotation status+lib/update-notice.tsand guarantee a manual force-restart lever inlib/codex-manager/commands/rotation.ts. - close the test gaps: respawn-on-drift (with windows + concurrency variants) and a
/v1/modelspass-through guard reusingtest/gpt56-models.test.tsfixtures.
Design Choices
Design Choice 1: what is the actual root cause of gpt-5.6 being invisible only on the app-bind/vs code path?
Options Considered:
- stale long-lived app-bind router — the detached process spawned before the upgrade keeps serving with the previously-compiled
dist/lib/runtime-rotation-proxy.js(and its transitivemodel-map), while the cli always loads freshly. no version-staleness marker is persisted inAppBindState/AppBindRouterStatus, and reuse is gated only on pid liveness + config hash, not package version. /v1/modelsresponse-body filtering in the proxy — ruled out by exploration: no rewrite/filter of the models body exists inlib/runtime-rotation-proxy.tsorlib/local-bridge.ts.- account-selection divergence for the models context (
model: null, family: "codex") picking an account without gpt-5.6 entitlement — possible but not client-type-specific; both surfaces sharechooseAccount, so it can't by itself explain cli-vs-app divergence.
Chosen Option: 1
Rationale: it is the only confirmed mechanism that differs strictly by client surface (fresh-per-run cli vs persistent app-bind router with no upgrade-triggered restart), which precisely matches the "cli sees 5.6, extension doesn't, same install" symptom.
note: /v1/models is a byte-for-byte upstream pass-through with no client discrimination, and gpt-5.6 is first-class in lib/request/helpers/model-map.ts. the exploration could not fully read lib/runtime/app-bind.ts reuse/restart logic due to sandbox infra failures, so the root cause is inferred from confirmed structural facts.
💡 User Tips
Regenerate the plan with different choices with @coderabbitai <feedback>.
Implementation Steps
Phase 1: make the app-bind router upgrade-aware
goal: the persistent router process must not outlive the package version it was compiled against. we stamp the installed version at spawn, detect drift on every ensure/reuse check, and force a kill+respawn when the running router is stale. this is the actual bug fix — it guarantees the app-bind/vs code path runs the same dist/ code (including gpt-5.6 model-map) that a fresh cli invocation would.
concurrency + windows notes to respect while implementing:
- respawn must be atomic against a second process also trying to ensure the router (two codex clients launching simultaneously). guard with the existing state file + pid ownership; avoid a kill/spawn race that orphans two routers on the same port.
- pid liveness alone is insufficient and pid reuse is real on long-uptime windows/linux boxes — pair the pid check with the persisted version + a status-file heartbeat before trusting a running process.
- kill semantics differ per os:
SIGTERM/wait on posix, and the windows detached.cmd/startup entry must be re-pointed, not just killed, or the os auto-start will resurrect the stale binary path.
Task 1: persist the package version (and spawn timestamp) in app-bind state
record which codex-multi-auth build the router was launched from so drift is detectable.
- extend the
AppBindStateandAppBindRouterStatustypes inlib/runtime/app-bind.tsto includepackageVersion(frompackage.json) andspawnedAt. - write these fields wherever the state/status json is currently persisted at spawn time in
lib/runtime/app-bind.ts(thespawnRouter/status-write path). - read the installed version through the same accessor
lib/update-notice.tsalready uses for the local version, to avoid a secondpackage.jsonread path.
Task 2: add staleness detection to the reuse-vs-respawn decision
teach the ensure/reuse guard to treat a version mismatch as "must respawn," not just pid-dead.
- in the router reuse guard in
lib/runtime/app-bind.ts(themaybeStartRouter/ensureRouterRunning/spawnRouterfamily — exact fn name to confirm on read; exploration was blocked by sandbox infra, so verify against the current file before editing), extend the existing conditions (pid liveness, statusstate,boundConfigHash, host/port) with apersistedState.packageVersion !== currentVersioncheck. - when stale: terminate the existing router (os-appropriate signal + wait, mirroring the existing unbind teardown), then spawn a fresh one; do not merely reuse.
- keep
boundConfigHashsemantics unchanged (it is config-content-derived, not code-derived) — version drift is deliberately a separate, additive trigger. - ensure the kill+respawn cannot double-bind the port under concurrent callers (single-owner check via the state file before spawning).
🤖 Prompt for AI agents
implement the actual bug fix: make the persistent app-bind router upgrade-aware
so it can't keep serving stale `dist/` code after a package upgrade.
first, extend `AppBindState` and `AppBindRouterStatus` in
`lib/runtime/app-bind.ts` to carry `packageVersion` and `spawnedAt`. write both
fields at every point the state/status json is persisted during spawn (the
`spawnRouter`/status-write path in `lib/runtime/app-bind.ts`). pull the
installed version through the same accessor `lib/update-notice.ts` uses for its
local-version read — don't add a second `package.json` read path.
next, extend the router reuse/ensure guard in `lib/runtime/app-bind.ts` (the
`maybeStartRouter`/`ensureRouterRunning`/`spawnRouter` family — confirm the
exact function name against the current file before editing, since it wasn't
fully readable during exploration). add a `persistedState.packageVersion !==
currentVersion` check alongside the existing pid-liveness, status-`state`,
`boundConfigHash`, and host/port checks. on staleness, terminate the existing
router (os-appropriate signal + wait, mirroring the existing unbind teardown)
and spawn a fresh one instead of reusing it. leave `boundConfigHash` semantics
untouched — it stays config-content-derived; version drift is a separate,
additive trigger.
respect these constraints while implementing:
- guard the kill+respawn with the existing state file + pid ownership so two
concurrent callers ensuring the router at once can't double-bind the port or
orphan a second router.
- don't trust pid liveness alone — pid reuse is real on long-uptime
windows/linux boxes, so pair the pid check with persisted version plus a
status-file heartbeat.
- handle os-specific kill semantics: `SIGTERM`/wait on posix; on windows,
re-point the detached startup `.cmd`/startup entry rather than just killing the
process, otherwise os auto-start resurrects the stale binary path.
Phase 2: user-facing remediation and visibility
goal: even with auto-restart, give operators a deterministic manual lever and make staleness observable, so a user hitting this exact ticket can self-diagnose and fix without guessing.
Task 1: surface router staleness in rotation status and update-notice
make the stale-router condition legible instead of silent.
- in the rotation/app-bind status command (
lib/codex-manager/commands/rotation.ts— confirm subcommand surface on read; exploration was infra-blocked here), include the router'spackageVersion/spawnedAtand a computedstaleflag when it differs from the installed version. - extend
lib/update-notice.tsso that when it already detects a version change, it also flags a running-but-stale app-bind router and points the user at the remediation command.
Task 2: ensure a force-restart path exists for the router
guarantee re-running bind (or an explicit restart) respawns fresh code.
- confirm/adjust the bind path in
lib/codex-manager/commands/rotation.tsso re-running it while a router is active forces a respawn when stale (delegating to the Phase 1 guard), rather than reusing. - if no explicit restart affordance exists, add a minimal
restart/rebindbehavior that reuses the Phase 1 kill+respawn helper — do not build a new lifecycle system, just expose the existing one.
🤖 Prompt for AI agents
implement user-facing visibility and a manual remediation lever on top of the
phase 1 staleness detection.
in the rotation/app-bind status command
(`lib/codex-manager/commands/rotation.ts` — confirm the actual subcommand
surface against the current file, since this couldn't be fully verified during
exploration), surface the router's `packageVersion` and `spawnedAt`, and compute
a `stale` flag whenever they differ from the installed version.
extend `lib/update-notice.ts` so that whenever it already detects a version
change, it additionally flags a running-but-stale app-bind router and points the
user at the remediation command.
then guarantee a manual force-restart path: confirm/adjust the bind path in
`lib/codex-manager/commands/rotation.ts` so re-running it while a router is
active forces a respawn when stale, by delegating to the phase 1 kill+respawn
guard rather than reusing the stale process. if no restart affordance currently
exists, add a minimal `restart`/`rebind` behavior — reuse the phase 1 helper
directly, don't build a new lifecycle system on top of it.
Phase 3: regression coverage and docs
goal: lock the fix and document the operational contract. flagging explicitly: there is currently no regression test asserting the app-bind router respawns on version drift, and none asserting /v1/models pass-through preserves gpt-5.6 — both gaps are what let this ship.
Task 1: add regression tests for router version-staleness respawn
- add tests (alongside existing app-bind/runtime tests, e.g. a new
test/app-bind-*.test.ts) that: (a) a running router stamped with an olderpackageVersionis treated as stale and respawned; (b) a matching version is reused; (c) pid-dead is respawned regardless of version. - include a windows-path variant assertion for the startup
.cmdre-point, and a concurrent-ensure test that asserts a single owner/port survivor.
Task 2: add a pass-through guard test for `/v1/models` + gpt-5.6, and document the operational contract
- add a proxy-level test asserting
/v1/modelsis forwarded unmodified (body untouched) so a future change can't silently start filtering gpt-5.6; reuse thegpt-5.6-*fixtures already exercised intest/gpt56-models.test.ts. - update
docs/troubleshooting.md/docs/upgrade.mdwith the "after upgrading, the app-bind router auto-restarts; if models look stale in the vs code extension, run the rotation restart/bind command" note, and reference the gpt-5.6 rollout in the changelog/release notes.
🤖 Prompt for AI agents
close the two regression-test gaps that let this bug ship, and document the
operational contract for future upgrades.
add tests alongside the existing app-bind/runtime tests (e.g. a new
`test/app-bind-*.test.ts`) covering: (a) a running router stamped with an older
`packageVersion` is treated as stale and gets respawned; (b) a router with a
matching version is reused as-is; (c) a pid-dead router is respawned regardless
of version. also add a windows-path variant assertion covering the startup
`.cmd` re-point, and a concurrent-ensure test that asserts exactly one
owner/port survivor when two callers race to ensure the router.
add a proxy-level pass-through guard test asserting `/v1/models` is forwarded
with an untouched body, so a future change can't silently start filtering
gpt-5.6 — reuse the `gpt-5.6-*` fixtures already exercised in
`test/gpt56-models.test.ts`.
finally, update `docs/troubleshooting.md` and `docs/upgrade.md` with a note that
the app-bind router auto-restarts after an upgrade, and that if models look
stale in the vs code extension the user should run the rotation restart/bind
command. reference the gpt-5.6 rollout in the changelog/release notes.
Research
codex-multi-auth intercepts codex traffic through a loopback-only runtime rotation proxy (lib/runtime-rotation-proxy.ts). two client surfaces feed it:
- cli wrapper
scripts/codex.js— builds a shadowCODEX_HOME, rewrites a shadowconfig.tomlto point at the proxy, and callsstartRuntimeRotationProxy(...)fresh per invocation. - app bind
lib/runtime/app-bind.ts+scripts/codex-app-router.js— rewrites the real~/.codex/config.toml, then spawns a detached, long-lived router process (windows startup.cmd, macos launchagent, linux equivalent) that dynamically imports the compiled proxy once.
model knowledge is fully present in lib/request/helpers/model-map.ts (gpt-5.6 sol/terra/luna, aliases, resolveGpt56CatalogModel). /v1/models in both lib/local-bridge.ts and lib/runtime-rotation-proxy.ts is a transparent upstream pass-through — no static list, no client-type branching (buildModelsRequestContext fixes model: null, family: "codex"). outbound headers (originator=codex_cli_rs, OpenAI-Beta=responses=experimental) are identical across surfaces (lib/constants.ts). so nothing in this repo filters gpt-5.6 by client type; the only real behavioral divergence between cli and app-bind is process lifecycle: fresh-per-run vs persistent-and-never-restarted.
🚀 Next Steps
🤖 All AI agent prompts combined
Task: 1
implement the actual bug fix: make the persistent app-bind router upgrade-aware
so it can't keep serving stale `dist/` code after a package upgrade.
first, extend `AppBindState` and `AppBindRouterStatus` in
`lib/runtime/app-bind.ts` to carry `packageVersion` and `spawnedAt`. write both
fields at every point the state/status json is persisted during spawn (the
`spawnRouter`/status-write path in `lib/runtime/app-bind.ts`). pull the
installed version through the same accessor `lib/update-notice.ts` uses for its
local-version read — don't add a second `package.json` read path.
next, extend the router reuse/ensure guard in `lib/runtime/app-bind.ts` (the
`maybeStartRouter`/`ensureRouterRunning`/`spawnRouter` family — confirm the
exact function name against the current file before editing, since it wasn't
fully readable during exploration). add a `persistedState.packageVersion !==
currentVersion` check alongside the existing pid-liveness, status-`state`,
`boundConfigHash`, and host/port checks. on staleness, terminate the existing
router (os-appropriate signal + wait, mirroring the existing unbind teardown)
and spawn a fresh one instead of reusing it. leave `boundConfigHash` semantics
untouched — it stays config-content-derived; version drift is a separate,
additive trigger.
respect these constraints while implementing:
- guard the kill+respawn with the existing state file + pid ownership so two
concurrent callers ensuring the router at once can't double-bind the port or
orphan a second router.
- don't trust pid liveness alone — pid reuse is real on long-uptime
windows/linux boxes, so pair the pid check with persisted version plus a
status-file heartbeat.
- handle os-specific kill semantics: `SIGTERM`/wait on posix; on windows,
re-point the detached startup `.cmd`/startup entry rather than just killing the
process, otherwise os auto-start resurrects the stale binary path.
===============================================================================
Task: 2
implement user-facing visibility and a manual remediation lever on top of the
phase 1 staleness detection.
in the rotation/app-bind status command
(`lib/codex-manager/commands/rotation.ts` — confirm the actual subcommand
surface against the current file, since this couldn't be fully verified during
exploration), surface the router's `packageVersion` and `spawnedAt`, and compute
a `stale` flag whenever they differ from the installed version.
extend `lib/update-notice.ts` so that whenever it already detects a version
change, it additionally flags a running-but-stale app-bind router and points the
user at the remediation command.
then guarantee a manual force-restart path: confirm/adjust the bind path in
`lib/codex-manager/commands/rotation.ts` so re-running it while a router is
active forces a respawn when stale, by delegating to the phase 1 kill+respawn
guard rather than reusing the stale process. if no restart affordance currently
exists, add a minimal `restart`/`rebind` behavior — reuse the phase 1 helper
directly, don't build a new lifecycle system on top of it.
===============================================================================
Task: 3
close the two regression-test gaps that let this bug ship, and document the
operational contract for future upgrades.
add tests alongside the existing app-bind/runtime tests (e.g. a new
`test/app-bind-*.test.ts`) covering: (a) a running router stamped with an older
`packageVersion` is treated as stale and gets respawned; (b) a router with a
matching version is reused as-is; (c) a pid-dead router is respawned regardless
of version. also add a windows-path variant assertion covering the startup
`.cmd` re-point, and a concurrent-ensure test that asserts exactly one
owner/port survivor when two callers race to ensure the router.
add a proxy-level pass-through guard test asserting `/v1/models` is forwarded
with an untouched body, so a future change can't silently start filtering
gpt-5.6 — reuse the `gpt-5.6-*` fixtures already exercised in
`test/gpt56-models.test.ts`.
finally, update `docs/troubleshooting.md` and `docs/upgrade.md` with a note that
the app-bind router auto-restarts after an upgrade, and that if models look
stale in the vs code extension the user should run the rotation restart/bind
command. reference the gpt-5.6 rollout in the changelog/release notes.
💡 Iterate on the plan with:
`@coderabbitai` <feedback>
Example Feedback
- `@coderabbitai` You can skip phase 3. Add a simple unit test case for phase 2.
- `@coderabbitai` For design choice 1 go ahead with option 3 and replan.
💬 Have feedback or questions? Drop into our discord!