Patch the OpenAI Codex macOS desktop app to run on Intel Macs.
OpenAI ships the Codex 5.4 Mac (macOS) Desktop App as ARM64-only (Apple Silicon). This project patches it to run natively on x86_64 Intel Macs — no emulation, no Rosetta.
Target app: OpenAI Codex desktop app for macOS (the Electron-based GUI, not the CLI). Downloaded from openai.com/codex as
Codex.dmg.
The patcher script takes the official Codex.dmg and rebuilds the entire app bundle for Intel:
- Swaps Electron shell — downloads the matching Electron x64 build and replaces all ARM64 binaries (main binary, GPU/renderer/plugin helpers, framework libraries)
- Rebuilds native Node modules — compiles
node-pty,better-sqlite3against Electron headers for x86_64 - Stubs sparkle.node — replaces the ARM64 auto-update module with a no-op x64 stub (auto-update is disabled; the app works fine without it)
- Replaces bundled CLI tools — swaps the ARM64
codex(Rust binary) with a wrapper that delegates to the npm-installedcodex-cli, and replacesrg(ripgrep) with the Homebrew x64 build - Creates an env-clean launcher — wraps the main binary to strip
CLAUDECODEenvironment variables that cause conflicts when launched from Claude Code sessions - Re-signs everything — ad-hoc code signing with proper entitlements (JIT, unsigned memory, network access)
- macOS on an Intel (x86_64) Mac
- Node.js v22+ (via nvm or similar)
- Xcode Command Line Tools (
xcode-select --install) - Homebrew with
ripgrepinstalled (brew install ripgrep) - Codex CLI installed globally (
npm install -g @openai/codex) - Codex.dmg downloaded from openai.com/codex
# Clone the repo
git clone https://github.com/subkoks/codex-intel-patcher.git
cd codex-intel-patcher
# Run the patcher (pass the path to the downloaded DMG)
./patch-codex.sh /path/to/Codex.dmg
# Launch
open /Applications/Codex.appThe script backs up the original app to /Applications/Codex.app.bak before making any changes.
The Codex desktop app is an Electron 40.0.0 app with these native components:
| Component | Original | Patched |
|---|---|---|
| Electron shell | ARM64 | x86_64 (from GitHub releases) |
| node-pty@1.1.0 | ARM64 .node | Rebuilt for x64 + Electron 40 ABI |
| better-sqlite3@12.5.0 | ARM64 .node | Rebuilt for x64 + Electron 40 ABI |
| sparkle.node | ARM64 (Sparkle auto-updater) | No-op x64 stub |
| codex CLI (Rust) | ARM64 binary | Wrapper → npm codex-cli |
| rg (ripgrep) | ARM64 binary | Homebrew x86_64 binary |
| Launcher | Direct Electron | Env-cleaning wrapper |
The JavaScript application code (app.asar) is architecture-independent and remains untouched.
This patcher was built for the OpenAI Codex 5.4 macOS Desktop App. The script auto-detects Electron version and native module versions at runtime, so it may work with future releases — but there are no guarantees.
| What | Auto-detected? | Notes |
|---|---|---|
| Electron version | Yes | Downloaded from GitHub releases |
| node-pty version | Yes | Read from app.asar |
| better-sqlite3 version | Yes | Read from app.asar |
| sparkle.node API | No | Stub matches v26.305.950 exports |
| Bundled codex-rs binary | No | Replaced with npm codex-cli wrapper |
What could break in future versions:
- New native modules added (script only knows about node-pty, better-sqlite3, sparkle)
- sparkle.node API changes (new exported functions)
- Structural changes to the app bundle
- Features in codex-rs that the npm codex-cli doesn't support
If something breaks, the script will fail with a clear error rather than silently producing a broken app.
- Auto-update disabled — sparkle.node is stubbed. Update manually by re-running the patcher on a new DMG.
- Codex CLI wrapper — uses the npm
codex-cli(Node.js) instead of the native Rustcodex-rsbinary. Functionally equivalent but slightly slower startup. - Model access — GPT-5.3-Codex and GPT-5.4 require a paid OpenAI subscription. GPT-5.2-Codex works on free/ChatGPT accounts.
- MacBook Pro 16" 2019 (Intel Core i9, 32GB RAM)
- macOS Tahoe 26.3
- Codex.app v26.305.950 (build 863) — the Codex 5.4 release
- Electron 40.0.0 / Chromium 144
codex-intel-patcher/
├── patch-codex.sh # Main patcher script
├── src/
│ ├── codex-wrapper.c # Wrapper that delegates to npm codex-cli
│ ├── launcher.c # Env-cleaning launcher (strips CLAUDECODE vars)
│ ├── sparkle-stub.c # No-op sparkle.node replacement
│ └── entitlements.plist # macOS code signing entitlements
├── README.md
└── LICENSE
MIT