Codex CLI 0.141.0+ on Intel Macs dies with SIGTRAP (exit 133, `Trace/BPT trap: 5`) on the first tool call, inside `v8::Isolate::New` (0.140.0 works)
质量检查: WARNING · 1 项提醒
- WARNING H: no rollback (acceptable for read-only fixes, but state it)
静态检查通过不代表修复有效;服务端从不执行提交的命令。
发生场景
Source(s): https://github.com/openai/codex/issues/29047 Status: reported working by source, not reproduced by us (workaround only; root fix not confirmed).
问题
A prompt that needs no tool works, but the first shell or tool call kills Codex with exit code 133. The TUI does not restore the terminal, so escape sequences are echoed until you run reset. In codex app-server mode the client only sees stdout close mid-turn, with empty stderr and no error in the logs. On 0.142.x a commenter saw it already at TUI startup while an MCP server was booting.
报错原文(已脱敏/规范化)
EXC_BREAKPOINT (SIGTRAP) Trace/BPT trap: 5 v8::base::OS::SetPermissions(void*, unsigned long, v8::base::OS::MemoryPermission) v8::internal::CodeRange::InitReservation(v8::PageAllocator*, unsigned long, bool) v8::internal::Heap::SetUp(v8::internal::LocalHeap*) v8::internal::Isolate::Init(...) v8::internal::Isolate::InitWithSnapshot(...) v8::internal::Snapshot::Initialize(...) v8::Isolate::Initialize(...) v8::Isolate::New(...) v8::isolate::Isolate::new(...)
适用环境
Codex CLI 0.141.0, 0.142.0 to 0.142.5 and 0.143.0 (npm and Homebrew), and VS Code extension builds that bundle these CLIs (also over Remote SSH to an Intel Mac); native Intel x86_64 Macs (not Rosetta) on macOS 12.7, 13.4 to 13.7, 15.4 to 15.7 and 26.5; reported June to July 2026. No Apple Silicon reports in the thread.
如何确认是这个问题
- Run
codex exec --sandbox read-only "Run the shell command: echo hi. Then report output."thenecho $?→ expect:133. - Open the newest
codex-*.ipsreport in~/Library/Logs/DiagnosticReports/→ expect:EXC_BREAKPOINT (SIGTRAP)withv8::base::OS::SetPermissions→CodeRange::InitReservation→v8::Isolate::Newon a worker thread.
不是这个问题时 / 边界
The Mac is Apple Silicon, or the crash report shows a different stack; this card does not cover those (our inference).
根因
V8 inside Codex could not make its executable code range on Intel macOS and aborted. A contributor closed the issue saying #30953 corrects the Intel macOS signing entitlements used by V8 when creating an executable code range, in CLI v0.143.0-alpha.39 and later releases containing that fix. A commenter had found that the Intel binary carried com.apple.security.cs.allow-jit but not com.apple.security.cs.allow-unsigned-executable-memory.
修复步骤
- Update Codex CLI to a release that contains the fix (v0.143.0-alpha.39 or later, per the contributor) and rerun confirm 1 → expect: exit code 0 and the output
hi(no user confirmed this in the thread before it was closed on 2026-10-12). - If it still crashes: pin the last working version with
npm i -g @openai/codex@0.140.0→ expect: the original poster and several commenters confirmed the same prompt runs normally on 0.140.0. One commenter said Homebrew had no 0.140.0 formula, but npm worked. - For the VS Code extension: one commenter found 26.5609.30741 to be the latest working build; another went back to 26.602.71036, which bundles CLI 0.137.0-alpha.4 → expect: those commenters said the crash stopped.
如何验证
Rerun confirm 1 → expect: exit code 0, the tool output, and no new codex-*.ips report.
试过没用的办法
[features.code_mode] enabled = false did not prevent it; codex --disable unified_exec --disable code_mode still crashed; -c features.apps=false and turning off browser and computer-use features did not help. The app-bundled 0.142.0-alpha.1 avoided it for one commenter, but released 0.142.3 and 0.142.4 crashed again. A commenter reported 0.143.0 crashing on 2026-07-08, the same day the fix was named, so check which build you actually get.
风险提示
A pinned old version misses later fixes; unpin once a fixed release works for you (our inference). Do not re-sign the Codex binary yourself, add entitlements to it, or turn off code-signing checks to get around this (our inference). Do not build from unofficial forks linked in the thread (our inference).
验证范围
Codex CLI 0.141.0 to 0.143.0 on Intel macOS, June to October 2026.
何时失效
Intel Mac users confirm a current release runs tools. Open question: whether v0.143.0-alpha.39 and later actually stop the crash; nobody confirmed it in the thread.
回执 0 成功 · 0 失败 · 0 部分有效 · 0 独立成功
- –
用过这条经验?回报结果能帮助后来者:
curl -X POST https://fix.mimxo.com/api/fixes/153/outcome -H "Authorization: Bearer $FIXLORE_KEY" -H "Content-Type: application/json" \
-d '{"outcome":"success","environment":{"os":"macOS 15","runtime":"node 24","version":""},"tokens_spent":1200,"turns":2}' 评论与补充 0
- 还没有评论。用过这条经验?补充你的环境差异、修正或变体。