HenkDz/codex-native-selector

A local, native-style model selector customization for Codex Desktop on Windows & MacOS.

β˜… 4Forks 0JavaScriptGitHub β†—Compare

README

Codex Native Selector

A local customization of the Codex Desktop model selector, with verified Windows support and an experimental macOS build path.

Platform Codex Desktop License

This project turns Codex's compact model selector into a clearer and faster interface: model variants in tabs, the native reasoning slider with model-matched thumb emoji, model-specific animated colors, Fast mode ⚑ with slider glow, Ultimate power glow πŸ”₯ on max, per-model effort memory, a settings button, and an automatically grouped model menu.

The project does not redistribute Codex or replace the official installation. It generates a local portable copy from the Codex installation already on your computer.

Demo

Recording.2026-08-19.083152.mp4

▢️ Click the poster or link above to play 22s demo β€” tabs, ⚑ Fast particle stream, πŸ”₯ MAX glow.

Drag to MAX β†’ Range glows πŸ”₯, thumb pulses, burst fires. Toggle ⚑ Fast β†’ slider re-tints. Tabs switch model families β€” effort is remembered per exact model.

The βš™ button opens the available model families, such as 5.6, 5.5, 5.4, and 5.3 Codex Spark. Variants remain in the top row, so the model menu does not duplicate Sol, Terra, Luna, or Mini.

Features

  • Uses Codex Desktop's native model-power slider component (Yms + impl-DQ1U0Spg.js β€” tracks, ticks, bursts all tinted via --a).
  • Reads reasoning efforts from the real Codex model catalog.
  • Shows model variants only when they actually exist.
  • Displays a fixed Full tab for a family with no selectable variant.
  • Groups the model menu automatically by model family.
  • Recolors the Ultra animation using the active model family's color while preserving the native slider animation.
  • Fast mode ⚑ β€” fully wired (forwards serviceTierOptions through Yhs β†’ _hs, toggles ltr(f) β†’ Yms phase:active particle stream).
  • Ultimate power response πŸ”₯ β€” rightmost slider position triggers a quick accent flash, icon overshoot, and native MaxBurst.
  • Ultra + Fast danger shake β€” the slider assembly shakes only while both maximum power and Fast mode are active, with a reduced-motion fallback.
  • Model-matched thumb β€” the entire slider thumb becomes β˜€οΈ for Sol, 🌍 for Terra, πŸŒ‘ for Luna, or πŸ’  as the fallback.
  • Per-model effort memory β€” remembers the last reasoning effort per exact gpt-* model in localStorage.
  • Keeps Fast mode in the same row as the model variants.
  • Renders the model menu above the interface through the host build's React DOM portal to avoid clipping and z-index issues.
  • Creates a separate local copy while leaving the official installation untouched β€” auto-rebuilds on Store update via Launch Codex Native Selector.ps1.

How it works

flowchart LR
    A[Official Codex installation] --> B[Local app.asar]
    B --> C[Temporary extraction]
    C --> D[Targeted bundle patch]
    D --> E[Portable app.asar]
    E --> F[Customized native selector]
    F --> G[Real Codex catalog and efforts]
Loading

The patch only targets the selector bundle and preserves the original application structure, components, events, and backend. The rest of the application is copied without modification.

Installation

Requirements

  • Windows 10 or 11 for verified support.
  • macOS 12 or newer for the experimental macOS build path.
  • Codex Desktop installed officially.
  • Node.js 22.12 or newer (tested on 24.9.0).
  • Codex fully closed while building and launching.

macOS (experimental)

A macOS builder is included, but current macOS builds are not covered by CI or end-to-end verification. The repository contains a tested legacy 26.707 split-bundle profile; treat this path as experimental and validate the generated app locally.

The official macOS bundle is currently installed as /Applications/ChatGPT.app, even though it identifies itself as Codex. The builder also detects older /Applications/Codex.app installations.

Clone the repository and install the dependencies:

git clone https://github.com/Mirochill/codex-native-selector.git
cd codex-native-selector
npm install

Build the customized app:

./tools/build-macos.sh

To use a nonstandard installation or output path, pass both explicitly:

./tools/build-macos.sh "/Applications/ChatGPT.app" \
  "$HOME/Applications/Codex Native Selector.app"

The default output is ~/Applications/Codex Native Selector.app. The script extracts and patches a temporary copy, updates Electron's ASAR integrity digest, disables Sparkle updates for the copy, and ad-hoc signs the finished bundle. The official app is not modified. Avoid iCloud Drive and other File Provider destinations because they can attach metadata that invalidates a local app signature.

Quit the official Codex app, then launch:

open "$HOME/Applications/Codex Native Selector.app"

The official and customized copies must not run at the same time because they use the same Codex profile and bundle identity.

Windows

PowerShell is required in addition to the common requirements above.

1. Clone the repository

git clone https://github.com/Mirochill/codex-native-selector.git
Set-Location .\codex-native-selector
npm install

2. Build the customized copy

powershell.exe -NoProfile -ExecutionPolicy Bypass `
  -File .\tools\build-portable.ps1

The builder detects the newest installed Microsoft Store package and extracts its archive automatically. The result is generated in:

outputs\Codex-Native-Selector\

3. Launch Codex Native Selector

Close official Codex, including its tray icon in the Windows notification area, then launch:

outputs\Codex-Native-Selector\Launch Codex Native Selector.cmd

The official and customized copies must not run at the same time because they use the same local Codex environment. The launcher checks the installed Store version on every start and rebuilds the portable copy automatically when Codex has updated.

Compatibility

Verified against Codex 26.803.5235.0 and 26.803.10989.0 from the Microsoft Store on Windows. Current builds are located semantically from stable model-picker message IDs, component prop contracts, React relationships, and CSS-module class families. Renamed minified symbols and hashed asset filenames are inferred automatically. Exact compatibility profiles remain as a fallback for older layouts.

The macOS path has a dedicated legacy Codex 26.707 split-bundle profile and unit coverage, but no current macOS archive has been verified end-to-end. macOS support is experimental, not a current compatibility guarantee.

Discovery is intentionally fail-closed: the builder patches only when one complete selector graph and one complete slider class family are found. Ambiguous or incomplete matches stop with a diagnostic instead of modifying a guessed function.

Updating after a Codex update

The Codex frontend bundle can change its filenames or structure after an update. Rebuild from the new installation:

On macOS, quit Codex and rerun:

./tools/build-macos.sh

On Windows, close Codex fully and use the generated launcher. It detects the newest Store package and rebuilds automatically. You can also rerun tools\build-portable.ps1 manually.

If semantic discovery reports an incomplete selector graph, Codex changed a behavioral contract rather than only renaming or rehashing the bundle. Update the relevant semantic invariant in tools/semantic-selector-profile.mjs; do not weaken the one-graph safety check.

The builder discovers hashed assets, minified component names, JSX runtimes, hooks, slider components, Fast/Standard predicates and icons, wrapper prop aliases, catalog functions, and React DOM portals automatically. Version-specific mappings in tools/selector-compatibility.mjs provide fallback support for older builds. Both paths are covered by npm run check.

Advantages

Area Benefit
No Codex fork The project does not maintain a complete copy of the application.
No reinstallation The copy is rebuilt from Codex already installed locally.
Official installation preserved The installed app or Microsoft Store package is not overwritten.
Native components The slider, its events, and model behavior remain Codex components.
Dynamic catalog Models and reasoning efforts come from Codex's real configuration.
Targeted maintenance The patch focuses on one frontend bundle.

Important limitations

  • This is not an official plugin: Codex Desktop does not expose a public API for replacing its native UI with a plugin.
  • Windows is the verified target; the macOS builder is experimental and may need a platform-specific profile after an update.
  • A Codex update that changes the selector's behavioral contracts may still require a semantic-discovery update.
  • The macOS copy is ad-hoc signed for local use because changing app.asar invalidates the official signature. It is not a distributable or notarized build.
  • The official archive is not included on GitHub because of its size, redistribution concerns, and software ownership.
  • The project does not bypass authentication, account limits, or service rules.
  • The official instance must be closed before launching the customized copy.
  • Available models still depend on the user's account, plan, and Codex backend.

Troubleshooting

The application stays on the OpenAI logo

Make sure that app.asar was extracted from the currently installed Codex version, then rebuild the copy. An old extracted archive may contain incompatible chunk names.

The launcher says that another instance is open

Quit Codex from the Windows notification-area icon. Closing only the main window may leave the background process running.

On macOS, quit Codex with Command+Q before opening the customized copy.

macOS says the customized app is damaged or cannot be opened

Rebuild it locally from the official installation, then verify the local signature:

codesign --verify --deep --strict "$HOME/Applications/Codex Native Selector.app"

Do not copy a customized app built on another Mac. The generated bundle is intentionally ad-hoc signed for the machine that built it.

The selector does not show new models

Rebuild from the newest official archive. This project does not manufacture a model list: it reuses the catalog exposed by Codex.

The application shows β€œAn error occurred” after a Codex update

Run npm run check, extract app.asar from the current official installation, and rebuild. React error 130 usually means a discovered symbol did not resolve to a renderable component. Inspect the semantic diagnostic and update tools/semantic-selector-profile.mjs; do not map JSX targets to JSX-runtime or lazy-loader objects.

I want to return to official Codex

Close the customized copy, then launch Codex from the Start menu. No uninstall or file restoration is required.

Repository structure

docs/
β”œβ”€β”€ demo.mp4                 # 22s screen capture β€” tabs, Fast, MAX glow
└── demo-poster.jpg          # Video poster frame
tools/
β”œβ”€β”€ build-portable.ps1       # Copies the local installation and creates the launcher
β”œβ”€β”€ build-macos.sh           # Builds and ad-hoc signs a separate macOS app bundle
β”œβ”€β”€ build-inplace-asar.mjs   # Applies the targeted app.asar patch (handles a/i advanced view lock)
β”œβ”€β”€ semantic-selector-profile.mjs # Infers the current selector graph and CSS class family
β”œβ”€β”€ selector-compatibility.mjs # Semantic discovery entrypoint plus exact legacy fallbacks
└── selector-v2.js.txt        # Customized selector component (tabs, Fast, MAX glow, effort memory)

README.md
LICENSE
.gitignore
package.json

The outputs/, work/asar-extracted/, and generated archives are ignored by Git so that a full Codex copy, local profile, or personal data cannot be published accidentally.

License

The scripts and customization code in this repository are distributed under the MIT License.

Codex Desktop, its components, resources, and models remain the property of their respective owners. This community project is not affiliated with or endorsed by OpenAI.

Contributors

HenkDzMirochilljjjhenriksenericcox-kr

Issues