MyCodex is an MVP launcher for the Microsoft Store ChatGPT app on Windows. The Store package is
still named OpenAI.Codex; MyCodex starts its packaged ChatGPT app with Chromium proxy flags and
per-process proxy environment variables.
- Launches the installed Store package
app\ChatGPT.exedirectly. - Adds
--proxy-server=http://127.0.0.1:7897by default. - Sets
HTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXYonly on the launched ChatGPT process. - Waits for the Codex
resources\codex.exe app-serverchild process and verifies that it inherited the proxy environment variables. - Refuses to launch over an already running
ChatGPT.exeby default, because startup flags only reliably apply to a fresh process.
Build:
cargo buildBuild a release executable:
cargo build --releaseInstall for the current user:
.\target\release\mycodex.exe installThis copies the running executable to:
%LOCALAPPDATA%\MyCodex\MyCodex.exe
It also creates a current-user Start Menu shortcut:
%APPDATA%\Microsoft\Windows\Start Menu\Programs\MyCodex.lnk
The shortcut launches MyCodex.exe launch and uses the Microsoft Store app\ChatGPT.exe icon.
Running install again overwrites the installed executable, refreshes the shortcut, and removes the
legacy Codex++.lnk shortcut if present.
Preview the direct launch command without launching ChatGPT:
cargo run -- launch --dry-runLaunch with the default local proxy:
cargo run -- launchLaunch with a custom proxy:
cargo run -- launch --proxy http://127.0.0.1:7890Launch a specific ChatGPT executable directly:
cargo run -- launch --chatgpt-exe "C:\Program Files\WindowsApps\OpenAI.Codex_26.707.3748.0_x64__2p2nqsd0c76g0\app\ChatGPT.exe"The legacy option name --codex-exe remains available as an alias.
Launch without proxy environment variables, keeping only Chromium --proxy-server:
cargo run -- launch --no-envIn direct mode this also removes inherited HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY,
and their lowercase variants from the launched process.
Launch without checking whether app-server inherited proxy environment variables:
cargo run -- launch --no-env-checkEnable remote debugging for inspection:
cargo run -- launch --remote-debugging-port 9229 --remote-allow-origins http://127.0.0.1:9229Pass extra ChatGPT/Electron arguments after --:
cargo run -- launch -- --some-electron-flag=valueIf ChatGPT is already running and you intentionally want to skip the fresh-process guard:
cargo run -- launch --allow-existing-instanceAfter installation, the installed launcher can be run directly:
%LOCALAPPDATA%\MyCodex\MyCodex.exe launch- Direct mode discovers the installed package with
Get-AppxPackage -Name OpenAI.Codexand startsapp\ChatGPT.exe, falling back to the legacyapp\Codex.exewhen needed. Pass--chatgpt-exeif discovery fails or the package layout changes. - Direct mode still depends on the Store app accepting direct execution of
app\ChatGPT.exe. - It does not modify
app.asaror files underC:\Program Files\WindowsApps. - It does not write registry environment values or change the global Windows proxy.