Skip to content

Workaround: apply CodexThemes themes on Microsoft Store builds (ChatGPT.exe + CDP + selector fix) #3

Description

@HUC-he

Environment

Official OpenAI.Codex installed from Microsoft Store (WindowsApps package), build 26.727.x.

Symptom

  • apply --launch cannot theme the app: the Store build ignores the graceful quit, and launching resources\codex.exe with debugging flags fails with Access is denied.
  • Even when the theme is active, the background artwork does not render.

Root cause

  1. The Store package entry point is app\ChatGPT.exe, not resources\codex.exe.
  2. Current builds use main[data-app-shell-main-surface] as the main container, while the official runtime looks for main.main-surface, so the home/conversation page markers are never set and artwork selectors do not match.

Workaround (verified)

  1. Save your work, then fully quit Codex (force-stop only if the graceful close fails).

  2. Launch the Store entry point with loopback debugging:

    Start-Process -FilePath "<install>\OpenAI.Codex_*\app\ChatGPT.exe" -ArgumentList "--remote-debugging-address=127.0.0.1","--remote-debugging-port=9335"

  3. Wait until http://127.0.0.1:9335/json/list returns an app:// page.

  4. Hot-apply the theme with the official toolchain (no restart needed):

    node --experimental-transform-types apply-theme.ts apply <theme-dir> --port 9335

  5. If the artwork still does not render, patch the local runtime selector in apply-theme.ts:

    document.querySelector("main[data-app-shell-main-surface]") || document.querySelector("main.main-surface")

Safety notes

  • Never modify WindowsApps, app.asar, or the app signature.
  • Keep the debugging port bound to 127.0.0.1 only.
  • Re-run after Codex updates; behavior of Store builds can change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions