Summary
After installing the latest macOS update around 2026-06-06, the Codex CLI started crashing with Trace/BPT trap: 5 / SIGTRAP when Code Mode starts its runtime. This appears to be related to hardened runtime + V8 JIT executable-memory permissions: codesign reports that the binary contains an invalid entitlements blob, so macOS ignores those entitlements. Ad-hoc re-signing the binary locally with JIT entitlements stops the crash.
Environment
- macOS: 15.7.7, build 24G720
- Kernel: Darwin 24.6.0, x86_64
- Machine: Intel MacBookPro15,1 class hardware
- Standalone Codex CLI:
codex-cli 0.139.0
- Codex.app bundled CLI observed:
codex-cli 0.138.0-alpha.7
- Standalone binary path:
~/.codex/packages/standalone/current/bin/codex
Reproduction
From a terminal, run Codex normally and ask it to inspect a file so it starts Code Mode/tool execution, for example:
codex --no-alt-screen "look at AGENTS.md"
The TUI starts, but once the runtime begins executing tool code, the process exits with:
Crash report details
The macOS crash report shows:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Termination Reason: Trace/BPT trap: 5
The faulting thread stack includes:
v8::base::OS::SetPermissions(void*, unsigned long, v8::base::OS::MemoryPermission)
v8::internal::CodeRange::InitReservation(...)
v8::internal::Heap::SetUp
v8::internal::Isolate::Init
v8::internal::Isolate::InitWithSnapshot
v8::internal::Snapshot::Initialize
v8::Isolate::Initialize
v8::Isolate::New
codex_code_mode::runtime::spawn_runtime
In the crashing report, the register state had rdi = 13, consistent with EACCES from the memory permission change.
Codesign observations
Before applying the workaround, both the standalone CLI binary and the Codex.app bundled resource CLI reported:
warning: binary contains an invalid entitlements blob. The OS will ignore these entitlements.
The standalone binary was signed with hardened runtime before the local workaround:
Identifier=codex
TeamIdentifier=2DC432GLL2
flags=0x10000(runtime)
Confirmed workaround
Creating an entitlements plist containing:
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
and then re-signing the installed standalone binary locally fixes the crash:
codesign --force --sign - --entitlements /private/tmp/codex-jit.entitlements \
~/.codex/packages/standalone/current/bin/codex
After that, the same codex --no-alt-screen "look at AGENTS.md" scenario runs successfully, executes tool commands, and produces a normal answer. No new codex-*.ips crash report is generated.
Expected behavior
The distributed Codex CLI binaries should have valid entitlements for the embedded V8/Code Mode runtime on macOS, so users do not need to ad-hoc re-sign the binary after every update.
Actual behavior
After the macOS update, the official binary's entitlements appear to be ignored by the OS, V8 fails while setting executable memory permissions, and Codex exits with SIGTRAP during Code Mode runtime startup.
Summary
After installing the latest macOS update around 2026-06-06, the Codex CLI started crashing with
Trace/BPT trap: 5/SIGTRAPwhen Code Mode starts its runtime. This appears to be related to hardened runtime + V8 JIT executable-memory permissions:codesignreports that the binary contains an invalid entitlements blob, so macOS ignores those entitlements. Ad-hoc re-signing the binary locally with JIT entitlements stops the crash.Environment
codex-cli 0.139.0codex-cli 0.138.0-alpha.7~/.codex/packages/standalone/current/bin/codexReproduction
From a terminal, run Codex normally and ask it to inspect a file so it starts Code Mode/tool execution, for example:
codex --no-alt-screen "look at AGENTS.md"The TUI starts, but once the runtime begins executing tool code, the process exits with:
Crash report details
The macOS crash report shows:
The faulting thread stack includes:
In the crashing report, the register state had
rdi = 13, consistent withEACCESfrom the memory permission change.Codesign observations
Before applying the workaround, both the standalone CLI binary and the Codex.app bundled resource CLI reported:
The standalone binary was signed with hardened runtime before the local workaround:
Confirmed workaround
Creating an entitlements plist containing:
and then re-signing the installed standalone binary locally fixes the crash:
codesign --force --sign - --entitlements /private/tmp/codex-jit.entitlements \ ~/.codex/packages/standalone/current/bin/codexAfter that, the same
codex --no-alt-screen "look at AGENTS.md"scenario runs successfully, executes tool commands, and produces a normal answer. No newcodex-*.ipscrash report is generated.Expected behavior
The distributed Codex CLI binaries should have valid entitlements for the embedded V8/Code Mode runtime on macOS, so users do not need to ad-hoc re-sign the binary after every update.
Actual behavior
After the macOS update, the official binary's entitlements appear to be ignored by the OS, V8 fails while setting executable memory permissions, and Codex exits with
SIGTRAPduring Code Mode runtime startup.