If pre_exec only calls setsid, just pass posix_spawn's flag instead

charliermarsh · x · 2026-11-25

A concrete trick: some of Codex's preexec callbacks merely called setsid to start a new session — but posixspawn supports this natively, so you can just pass the flag instead and avoid the fork fallback.

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

Original post →

More from coding & agent

coding & agent channel →