Codex used to clone its entire app server just to run `ls`

charliermarsh · x · 2026-11-25

Charlie Marsh explains the motivation behind Codex's process-spawn optimization: running shell commands or hooks used fork + exec, and fork duplicates the parent's whole address space — so even a trivial ls effectively cloned the entire app server.

Related event: Codex speeds up process spawning 800x by replacing fork with posix_spawn(14 posts)→

Original post →

More from coding & agent

coding & agent channel →