Skip to content

Windows: model picker stays stale after ocx sync --restart-codex until full desktop app restart #2292

Description

@lidge-jun

Summary

On Windows, ocx sync --restart-codex rewrites the Codex model catalog and restarts the Codex app-server (codex.exe app-server), but the desktop app's model picker keeps showing the stale list. Only a full quit and relaunch of the desktop app refreshes it. On macOS the same command updates the picker immediately.

The desktop UI (Electron, process name ChatGPT.exe) fetches model/list / config/read from its child app-server over stdio and caches them; it invalidates that cache on a codex-app-server-initialized event. Killing only the app-server child externally does not reliably produce that event on Windows, so the picker stays stale even though the fresh app-server has the new catalog in memory.

Reproduction

  1. Run ocx sync --restart-codex while the Codex desktop app is open.
  2. Observe the output: catalog rewritten, app-server PIDs stopped and respawned.
  3. Check the process table: codex.exe has a fresh start time (e.g. synced 20:57, new PID 8592 started 20:59) while all ChatGPT.exe UI processes keep their earlier start time.
  4. Open the model picker: it still lists only the old models instead of the 5 newly appended ones.
  5. Fully quit the desktop app and relaunch: the picker now shows the new models.

Expected: after ocx sync --restart-codex, the picker reflects the new catalog without a full app restart (as on macOS), or at minimum there is a supported way to force the refresh.

Version

2.27.0

Operating system

Windows 11 Pro (build 26200)

Logs or error output

[opencodex] Removed unsupported reasoning efforts: max, ultra
   + 5 models appended to Codex catalog (C:\Users\super\.codex\opencodex-catalog.json)
Stopping Codex app-server process(es): 15060, 5092 ...
Stopped Codex app-server PID(s): 5092, 15060
# picker still stale until full app restart

Related upstream issues (unverified status)

Note: the app is currently distributed as a beta-channel MSIX package (OpenAI.Codex 26.818.3698.0); this behavior was observed on that build and may change as the app matures.

Proposed direction

A --restart-desktop-app style option for ocx sync on Windows that gracefully closes the Electron shell (CloseMainWindow), falls back to taskkill /PID <root> /T /F bounded to the package install location, and relaunches via the AUMID (shell:AppsFolder\OpenAI.Codex_...!App). A working standalone implementation exists in scripts/restart-codex-desktop-app.ps1 (commit 58abd7b6d).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcatalogModel catalog, slugs, visibility, routed entriescliCLI, config inject, packaging flagsplatformOS/service/tray/ACL (Windows-heavy, not Windows-only)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions