codex-cli 0.142.5 on macOS 26.5.1 Intel crashes when the server sends functions.exec. The crash occurs in V8 OS::SetPermissions with SIGTRAP. It reproduces with unified_exec, code_mode, and code_mode_only explicitly disabled.

Open 💬 1 comment Opened Jul 7, 2026 by altafrattani

What version of Codex CLI is running?

codex-cli 0.142.5

What subscription do you have?

Enterprise

Which model were you using?

gpt-5.6-sol

What platform is your computer?

Darwin 25.5.0 x86_64 i386

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

iTerm2 3.6.11 No tmux, screen, or zellij multiplexer. Shell: zsh

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1783460648s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.142.5",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "<HOME>/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "<HOME>/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "<HOME>/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "<HOME>/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "<HOME>/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "<HOME>/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "<HOME>/.codex",
        "config.toml": "<HOME>/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "<REPO>",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, auto_compaction, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "none",
        "feature flags enabled": "33",
        "log dir": "<HOME>/.codex/log",
        "mcp servers": "4",
        "model": "<default>",
        "model provider": "openai",
        "sqlite home": "<HOME>/.codex"
      },
      "remediation": null,
      "durationMs": 1
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.49.0",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/local/bin/git",
        "PATH git #2": "/usr/bin/git",
        "PATH git #3": "<HOME>/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin/git",
        "PATH git entries": "3",
        "git branch": "<REDACTED_BRANCH>",
        "git build options": "git version 2.49.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon; libcurl: 8.6.0; zlib: 1.2.12",
        "git exec path": "/usr/local/opt/git/libexec/git-core",
        "git version": "git version 2.49.0",
        "repo detected": "true",
        "repo root": "<REPO>",
        "selected git": "/usr/local/bin/git"
      },
      "remediation": null,
      "durationMs": 69
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/usr/local/bin/codex",
        "PATH codex #2": "/Applications/Codex.app/Contents/Resources/codex",
        "PATH codex entries": "2",
        "current executable": "/usr/local/bin/codex",
        "install context": "brew",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 17
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "4",
        "disabled servers": "0",
        "stdio servers": "4"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 1179
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 1803
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running brew on macos-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "/usr/local/bin/codex",
        "install method": "brew",
        "platform": "macos-x86_64",
        "version": "0.142.5"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (system)",
      "details": {
        "search command": "rg",
        "search command readiness": "ripgrep 15.1.0",
        "search provider": "system"
      },
      "remediation": null,
      "durationMs": 23
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "<HOME>/.codex/tmp/arg0/<REDACTED>/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "<HOME>/.codex (dir)",
        "active rollout files": "139 files, 117035203 total bytes, 841979 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "<HOME>/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "<HOME>/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "<HOME>/.codex/log (missing)",
        "memories DB": "<HOME>/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "<HOME>/.codex (dir)",
        "state DB": "<HOME>/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 1025
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "139",
        "rollout DB active rows": "139",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=139",
        "rollout DB rows": "139",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=124, vscode=9, subagent:thread_spawn=6",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 3996
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-US",
      "details": {
        "EDITOR": "not set",
        "GH_PAGER": "set",
        "GIT_PAGER": "set",
        "LANG": "C.UTF-8",
        "LC_ALL": "C.UTF-8",
        "LC_CTYPE": "C.UTF-8",
        "LESS": "set",
        "PAGER": "set",
        "VISUAL": "not set",
        "os": "Mac OS 26.5.1 [64-bit]",
        "os language": "en-US",
        "os type": "Mac OS",
        "os version": "26.5.1"
      },
      "remediation": null,
      "durationMs": 7
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORTERM": "present",
        "NO_COLOR": "present",
        "TERM": "xterm-256color",
        "color output": "disabled (NO_COLOR)",
        "effective locale": "C.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "unknown",
        "terminal size": "80x24"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "git repo root",
        "terminal title project value": "<REDACTED_REPO>",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.142.5",
        "check for update on startup": "true",
        "last checked at": "2026-07-07T21:19:02.305297Z",
        "latest version": "0.142.5",
        "latest version status": "current version is not older",
        "update action": "brew upgrade --cask codex",
        "version cache": "<HOME>/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 415
    }
  }
}

What issue are you seeing?

Codex CLI consistently terminates with SIGTRAP when it receives a
JavaScript exec custom-tool call.

The CLI starts normally and can stream the agent's initial response. When
the agent attempts its first repository-search command, the terminal prints:

[1] <PID> trace trap codex

The corresponding macOS .ips reports show:

Exception: EXC_BREAKPOINT
Signal: SIGTRAP
Termination: Trace/BPT trap: 5

The triggered thread begins with:

v8::base::OS::SetPermissions(
void *,
unsigned long,
v8::base::OS::MemoryPermission
)
v8::internal::CodeRange::InitReservation(...)
v8::internal::Heap::SetUp(...)
v8::internal::Isolate::Init(...)
v8::Isolate::New(...)

The Codex event log shows that the crash happens immediately after the
Responses API returns a custom tool call named exec. Its input is
JavaScript that invokes a nested shell tool, for example:

const r = await tools.shell_command({
command: "rg ...",
workdir: "<REDACTED>",
timeout_ms: 10000
});
text(r);

The underlying shell command never starts because Codex crashes while
initializing the embedded V8 isolate.

This has reproduced repeatedly with different processes, including PIDs
69157, 74991, and 77605.

The following workarounds did not prevent the crash:

codex --disable unified_exec
codex --disable code_mode --disable code_mode_only

codex --version, codex --help, and codex doctor work normally.

What steps can reproduce the bug?

  1. Install Codex CLI 0.142.5 using Homebrew Cask on an Intel Mac running

macOS 26.5.1.

  1. Open iTerm2 and enter a Git repository.
  1. Start Codex:

codex

  1. Submit a task that requires searching the repository, for example:

"Trace where instance hostnames and node-pool metadata are defined,
then describe the smallest safe change."

  1. Codex prints its initial progress message.
  1. The model returns a JavaScript custom tool call named exec, typically

calling tools.shell_command or tools.exec_command.

  1. The process immediately exits:

[1] <PID> trace trap codex

The crash also reproduces with:

codex --disable unified_exec

and:

codex --disable code_mode --disable code_mode_only

Latest affected thread ID:

019f3e7c-a495-7d02-8c01-8d4b4adae640

What is the expected behavior?

Codex should initialize the tool runtime, execute the requested repository
search, return the command output to the model, and continue the task.

If the embedded JavaScript runtime cannot initialize, Codex should return
a recoverable tool error or fall back to a direct shell tool. It should not
terminate the entire CLI process with SIGTRAP.

Additional information

Installation:

  • Install method: Homebrew Cask
  • Executable:

/usr/local/Caskroom/codex/0.142.5/codex-x86_64-apple-darwin

  • Signing team: OpenAI OpCo, LLC (2DC432GLL2)
  • Hardened runtime is enabled
  • Configuration parses successfully
  • Codex state databases pass integrity checks

All inspected crash reports have the same top frames:

  1. v8::base::OS::SetPermissions
  2. v8::internal::CodeRange::InitReservation
  3. v8::internal::Heap::SetUp

The problem is deterministic when the model sends a JavaScript exec
custom-tool call. Disabling unified_exec, code_mode, and
code_mode_only from the command line does not prevent that tool call or
the V8 initialization crash.

Relevant macOS crash reports are available and can be attached to this
issue.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗