Codex CLI 0.141.0 crashes with SIGTRAP on Intel macOS when executing tools

Open 💬 3 comments Opened Jun 22, 2026 by thaafox
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex CLI is running?

0.141.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5

What platform is your computer?

macOS 12.7.6 (Intel x86_64)

What terminal emulator and version are you using (if applicable)?

Apple Terminal 445.1

Codex doctor report

{
  "overallStatus": "ok",
  "codexVersion": "0.141.0",
  "checks": {
    "runtime.provenance": { "status": "ok", "install method": "standalone", "platform": "macos-x86_64" },
    "auth.credentials": { "status": "ok", "stored ChatGPT tokens": "true" },
    "config.load": { "status": "ok", "feature flags enabled": "29" },
    "network.websocket_reachability": { "status": "warn", "handshake result": "HTTP 401 Unauthorized" },
    "sandbox.helpers": { "status": "ok" }
  }
}

What issue are you seeing?

Codex CLI 0.141.0 crashes with zsh: trace trap codex (SIGTRAP / EXC_BREAKPOINT) on Intel macOS when the agent executes tools.

Observed behavior:

  • TUI starts and accepts input
  • Short read-only prompts succeed
  • Crash happens when tool execution begins (e.g., shell commands, file writes)
  • codex doctor reports installation and runtime as healthy
  • Crash signature consistently shows EXC_BREAKPOINT / SIGTRAP / Trace/BPT trap: 5

Steps to reproduce:

  1. Install Codex CLI 0.141.0 on Intel macOS (standalone installer)
  2. Run codex
  3. Ask a prompt that requires tool execution (e.g., create or edit a file)
  4. Process aborts with zsh: trace trap codex

Additional context:

  • Reproduces with both the standalone installer and npm install
  • Reproduces outside VS Code and in a clean terminal
  • Reproduces after resetting ~/.codex
  • 0.140.0 does not exhibit this crash on the same hardware/OS combination
  • Looks related to V8 isolate initialization in tool execution on x86_64

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #29047
  • #29136
  • #28893
  • #29111
  • #29334

Powered by Codex Action

ezraluuu-lhk · 2 months ago

I’m seeing what looks like the same issue on an Intel Mac.
Environment:

Machine: MacBookPro15,2
CPU: Intel x86_64
OS: macOS 15.7.7 (24G720)
SIP: enabled
Codex versions tested: 0.141.0, 0.142.3, 0.142.4
Install channels tested: npm and Homebrew cask/native x64 binary
Current install: npm @openai/codex 0.142.4

Behavior:

Plain no-tool chat works.
Any local shell/tool command crashes Codex with SIGTRAP.
Clean CODEX_HOME reproduces.
Resetting/moving ~/.codex state/session files did not fix it.
Memory pressure was improved before retesting; crash still reproduces.
Proxy/Surge env changes did not change the crash signature.
codesign entitlements show com.apple.security.cs.allow-jit is present.

Minimal repro:

mkdir -p "$HOME/.codex_tool_test"
CODEX_HOME="$HOME/.codex_tool_test" codex

Prompt inside Codex:

Do not use skills, docs lookup, web lookup, or repo analysis. Use exactly one local shell command: `pwd`. After the command result, stop.

Observed:

zsh: trace trap codex

Sometimes before the crash:

⚠ Falling back from WebSockets to HTTPS transport. request timed out

codex doctor --json summary:

overallStatus: warning
installation: ok
auth.credentials: ok
config.load: ok
state DB integrity: ok
network.provider_reachability: ok
network.websocket_reachability: warning
summary: Responses WebSocket timed out; HTTPS fallback may still work
notes: handshake timed out
runtime.provenance: running npm on macos-x86_64

Crash report consistently points to V8 isolate initialization during Codex local tool runtime startup:

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5
codex_code_mode::runtime::spawn_runtime
v8::isolate::Isolate::new
v8::Isolate::New
v8::internal::CodeRange::InitReservation
v8::base::OS::SetPermissions

More complete crashed thread from one report:

Thread Crashed:
0   codex  v8::base::OS::SetPermissions(void*, unsigned long, v8::base::OS::MemoryPermission) + 231
1   codex  v8::internal::CodeRange::InitReservation(v8::PageAllocator*, unsigned long, bool) + 587
2   codex  v8::internal::Heap::SetUp(v8::internal::LocalHeap*) + 399
3   codex  v8::internal::Isolate::Init(...) + 1967
4   codex  v8::internal::Isolate::InitWithSnapshot(...) + 9
5   codex  v8::internal::Snapshot::Initialize(v8::internal::Isolate*) + 539
6   codex  v8::Isolate::Initialize(...) + 603
7   codex  v8::Isolate::New(...) + 55
8   codex  v8::isolate::Isolate::new::h73bb8a3ceb41a1b1 + 103
9   codex  ...
10  codex  std::sys::backtrace::__rust_begin_short_backtrace::h688e855f528eec0f + 89

This happens outside VS Code too, directly in the CLI. VS Code appears affected because it uses the same app-server/tool-runtime path.

I have not yet verified whether 0.140.0 works on my machine, but 0.141.0, 0.142.3, and 0.142.4 all reproduce the crash.

Update: I tested @openai/codex@0.140.0, and it works on the same machine with the same minimal repro.

So the regression range appears to be:

0.140.0: works
0.141.0: crashes
0.142.3: crashes
0.142.4: crashes
ezraluuu-lhk · 2 months ago

Confirmed the fix: add com.apple.security.cs.allow-unsigned-executable-memory
alongside the existing allow-jit entitlement in .github/scripts/macos-signing/
codex.entitlements.plist.

This prevents the Intel macOS V8 isolate initialization SIGTRAP. Patch:
https://github.com/ezraluuu-lhk/codex/commit/ca9d055257