Codex built its own Rust Command abstraction to stay on posix_spawn

charliermarsh · x · 2026-11-25

The core engineering fix: the team wrote their own Command abstraction (like std::process::Command) that calls posixspawn directly in cases where the standard library would fall back to fork. Known fallback traps: preexec callbacks, and relative executables with a currentdir on macOS (a historical bug). The stakes are high — Codex spawns processes (shells, local MCP servers, hooks) millions of times per week.

Related event: Codex Builds Custom Rust Command Abstraction to Avoid Fork Fallback(2 posts)→

Original post →

More from coding & agent

coding & agent channel →