This project allows you to port the official Arm64 (Apple Silicon) Codex Desktop App to run on Intel Macs.
- Node.js: Installed on your system.
- Codex CLI: You must have the official
@openai/codexCLI installed globally, as we need its x64 binary.npm install -g @openai/codex
- Codex.dmg: The official Arm64 installer (place it in this directory).
Run the rebuild script:
node rebuild_codex.jsFor a fully clean build (removes all cached and transient files first):
node rebuild_codex.js --cleanThis script will:
- Mount
Codex.dmgand extract the app logic (app.asar), icon, and configuration. - Download the compatible x64 Electron runtime.
- Rebuild native modules (
better-sqlite3,node-pty) for Intel architecture. - Copy the x64
codexbinary from your local CLI installation. - Generate
Codex_Intel.app.
Note: The script caches the extracted resources and downloaded Electron zip to speed up subsequent builds. Use
--cleanif you've updatedCodex.dmgor the CLI to ensure stale files aren't reused.
Open the generated app:
open Codex_Intel.appIf you see "App is damaged", run:
xattr -cr Codex_Intel.appNote: This is a manual port. Auto-updates will not work.
To update:
- Download the new
Codex.dmgfrom OpenAI. - Replace the old
Codex.dmgin this folder. - If the Codex CLI also updated, run
npm update -g @openai/codex. - Run
node rebuild_codex.js --cleanto ensure a fresh build with the new files.
The built app launches with the --no-sandbox Electron flag via a wrapper script at Contents/MacOS/Codex. This disables Chromium's internal process sandbox, which is necessary to allow tools like Playwright to spawn browser subprocesses from within the integrated terminal.
This is separate from the macOS Seatbelt sandbox that Codex uses for workspace isolation. To enable network access inside the Codex terminal, set the following in your Codex config.toml:
[sandbox_workspace_write]
network_access = true-
"Operation not permitted":
- The app is self-signed/unsigned. You must remove the quarantine attribute:
xattr -cr Codex_Intel.app
- If Playwright or other tools fail, ensure you are running the app via the wrapper
Contents/MacOS/Codex(which the.appbundle does by default) which adds--no-sandbox.
- The app is self-signed/unsigned. You must remove the quarantine attribute:
-
Build Failures (Native Modules):
- If you see errors about
source_locationor C++ compilation duringnpm install:- Ensure your Xcode Command Line Tools are up to date (Xcode 15+ recommended for C++20 support).
- The build script attempts to force C++20 mode (
-std=c++20), which requires a modern compiler. - Try running
xcode-select --installto update your tools.
- If you see errors about
-
"Could not find local x64 Codex binary":
- The script now searches dynamically for the
codexbinary. Ensure you have the latest version of@openai/codexinstalled globally. - Run
npm list -g @openai/codexto verify installation path.
- The script now searches dynamically for the
-
Blank Window: Usually means the executable name doesn't match
Info.plist. The script handles this via a wrapper atContents/MacOS/Codexthat launchesCodex.orig. -
Missing Binary: Ensure the Codex CLI is installed globally (
npm install -g @openai/codex). -
No Network in Terminal: Set
network_access = truein your Codexconfig.toml(see Security Note above). -
Playwright / Browser Spawning: Should work out of the box thanks to
--no-sandbox. If issues persist, ensure network access is enabled. -
Crashes: Check console logs. If
sparkle.node(auto-updater) crashes, ignore it; the app should still function.