English | Simplified Chinese
A user-space patch helper for the Windows 11 Microsoft Store/MSIX build of the Codex desktop client.
The goal is to create a reversible Codex-patched copy without administrator privileges, without modifying the original Store package, and without storing any API key in this repository. The patched copy relaxes selected frontend gates related to Fast/Speed mode when Codex is used with API-key based configuration.
- This project is intended only for the Windows Store/MSIX installation of Codex.
- Run it from an ordinary PowerShell session, not an Administrator PowerShell session.
- The script does not read, write, store, or require any API key.
- The original Store package under
C:\Program Files\WindowsApps\...is not modified. - The patched copy is created under
%LOCALAPPDATA%\Programs\Codex-patched. - The Start Menu still launches the original Store app. Launch the patched copy from
Codex-patched\Codex.exe. - After every Codex update, run
--dry-runbefore applying a patch again.
- Windows 11
- Codex installed from Microsoft Store/MSIX
- Node.js with
npm.cmdandnpx.cmdavailable - Ordinary user permissions
Check the runtime tools:
node --version
npm.cmd --version
npx.cmd --versionIf npx.cmd is unavailable, install Node.js LTS and reopen PowerShell:
winget install OpenJS.NodeJS.LTSThe only script you need to run is:
codex-fast-patch-universal.js
Supported modes:
node .\codex-fast-patch-universal.js --dry-run
node .\codex-fast-patch-universal.js --apply
node .\codex-fast-patch-universal.js --launch- Clone or download this repository.
- Open ordinary PowerShell in the repository directory.
- Run the read-only check:
node .\codex-fast-patch-universal.js --dry-runContinue only when the required patch points are all found:
REQUIRED: hits=3 misses=0
Optional misses usually mean a plugin, voice, sidebar, usage, or i18n gate changed in the current Codex build. Fast/Speed patching can still proceed when the required group is complete.
- Apply the patch:
node .\codex-fast-patch-universal.js --apply- Launch the patched copy:
node .\codex-fast-patch-universal.js --launchOr launch it manually:
& $env:LOCALAPPDATA\Programs\Codex-patched\Codex.exeDuring --apply, the script:
- Locates the Store/MSIX Codex package with
Get-AppxPackage -Name OpenAI.Codex. - Reads the original
app\resources\app.asar. - Runs a read-only dry run against the original package.
- Copies the Store app directory to
%LOCALAPPDATA%\Programs\Codex-patched. - Backs up
resources\app.asarasresources\app.asar.bak. - Unpacks the copied
app.asarintoresources\app. - Applies targeted frontend JavaScript patches.
- Tries to update Electron fuses so the unpacked app directory is loaded.
- Falls back to repacking
resources\appintoresources\app.asarif the current Electron binary does not support fuse writing.
The script attempts to handle frontend gates related to:
- Fast/Speed authorization
- Fast/Speed early-disable branches
- model availability checks
- plugin sidebar availability
- plugin connector availability
- voice input availability
- usage settings availability
- i18n/multilingual availability
If a Codex update changes frontend file names or code shape, --dry-run may report misses. Required misses should be treated as a stop condition.
This project does not manage API keys. Codex configuration is usually stored in:
%USERPROFILE%\.codex\config.toml
%USERPROFILE%\.codex\auth.json
Changing an API key usually does not require patching again. Update the relevant Codex configuration file, fully quit Codex, and restart the patched copy.
Never commit API keys, auth.json, config.toml, logs, or personal Codex state to this repository.
The patched app is only a user-space copy. Remove it to roll back:
$dst = Join-Path $env:LOCALAPPDATA Programs\Codex-patched
if (Test-Path $dst) {
Remove-Item -LiteralPath $dst -Recurse -Force
}The original Store app remains untouched.
If Fast/Speed options do not appear after --apply, first confirm you launched the patched copy:
& $env:LOCALAPPDATA\Programs\Codex-patched\Codex.exeIf npx is blocked by PowerShell execution policy, use the .cmd entry points:
npm.cmd --version
npx.cmd --versionIf the target directory already exists, remove the old patched copy before reapplying.
See Codex Data Migration for the English migration guide and Codex Data Migration.zh.md for the Chinese version.
- Run
--dry-runafter every Codex update. - Apply only when
REQUIRED: hits=3 misses=0. - Treat required misses as a sign that the Fast/Speed core code path has changed.
- Optional misses usually affect non-core gates only.
- Do not commit
.codex,auth.json,config.toml, API keys, logs, or personal configuration.