OpenAI open-sources fix for Codex MCP server spawning reliability on macOS

charliermarsh · x · 2026-11-25

Astral founder Charlie Marsh noted Codex spawns shell processes millions of times a week — running commands, starting local MCP servers, firing hooks — and confirmed the related fix is now merged into the open-source openai/codex repo.

PR #42117 root cause: on macOS, Rust falls back to fork when a command combines a relative executable path with a working directory, due to a historical posixspawnp issue, making local MCP server startup unreliable. The fix spawns relative macOS MCP executables directly via posixspawn, preserving the configured path, argv[0], working directory, environment, stdio and process group. PATH lookup and executables without a shebang keep the existing launcher. A unified local child wrapper handles both legacy and 2026-07-28 protocol framing, with cancellation-safe waiting plus kill-and-reap cleanup of dropped children.

Original post →

More from coding & agent

coding & agent channel →