[macOS] CLI 0.144.6 hangs indefinitely spawning codex-security MCP; Esc and timeout are ineffective
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- macos, rust
- Domain
- cli, operating-systems
Research direction
Reproduce the macOS arm64 hang with Codex CLI 0.144.6 and the codex-security MCP server, then inspect the rmcp::transport::child_process::TokioChildProcessBuilder::spawn and process_wrap::tokio::core::CommandWrap::spawn paths. Trace how the synchronous read interacts with startup timeout and Esc cancellation. Done means MCP startup either completes or returns an actionable timeout, and Esc reliably cancels it.
Written by the indexing model from the issue text.
Description
Summary
On macOS arm64, Codex CLI 0.144.6 can hang indefinitely while starting the codex-security MCP server:
Starting MCP servers (5/6): codex-security (... • esc to interrupt)
The session never becomes usable. Pressing Esc does not interrupt startup, and the startup timeout is not enforced. The affected process remained stuck for more than 23 minutes.
Environment
- macOS 26.5.2 (build 25F84), arm64
- Codex CLI:
codex-cli 0.144.6 - Codex Security plugin:
0.1.13 - Node.js:
v22.23.1 - Launch command:
codex --dangerously-bypass-approvals-and-sandbox
The PATH-resolved CLI is managed by an external local runtime (Orca), but the hang occurs inside Codex's MCP child-process startup path.
Steps to reproduce
- Install/enable the Codex Security plugin.
- Launch Codex CLI in a repository:
codex --dangerously-bypass-approvals-and-sandbox - Observe startup stop at
Starting MCP servers (5/6): codex-security. - Press Esc or wait beyond the configured/default MCP startup timeout.
Actual behavior
- Startup remains stuck indefinitely.
- Esc does not cancel.
- No
codex-securitychild process appears under the Codex process. - Other MCP child processes are present and idle.
- The CLI process remains alive but the session cannot be used.
Expected behavior
Codex should either:
- successfully spawn and initialize the MCP server, or
- fail within the startup timeout with an actionable error.
Esc should always cancel MCP startup.
Diagnostic evidence
Repeated macOS process samples showed a Tokio worker blocked in the MCP child-process spawn path:
rmcp::transport::child_process::TokioChildProcessBuilder::spawn
process_wrap::tokio::core::CommandWrap::spawn
read (libsystem_kernel.dylib)
The codex-security process itself had not been created, so the hang occurs before the MCP initialize handshake.
I also launched the exact plugin entrypoint directly and sent an MCP initialize request. It returned a valid response within five seconds with no stderr, which suggests that the plugin runtime itself is healthy.
As a version comparison, the Codex CLI bundled with the desktop app (0.146.0-alpha.3.1) completed MCP startup and reached the prompt in about ten seconds using the same repository and configuration.
This suggests the child-process spawn operation in 0.144.6 can block in a synchronous read() that is not covered by the MCP startup timeout or cancellation path.
Related issue
Related to #20167, but this appears to be a distinct failure mode: #20167 reports a codex_apps handshake/network timeout, whereas here the local codex-security child process is never spawned and the CLI is blocked inside the spawn implementation.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·