Add a shared sandbox launcher for Linux and macOS (#62353)

## Why

Running each helper through `codex sandbox` keeps a separate Codex
supervisor process alive for each helper. A shared launcher lets one
supervisor manage multiple helpers concurrently.

## What changed

Add a launcher mode that multiplexes helper I/O and exit status over a
newline-delimited JSON protocol on stdin and stdout. Each helper uses
the host sandbox setup with its own configuration and network proxy.
The launcher applies backpressure to helper I/O, drains buffered output
on exit, and stops tracked helpers when the controller disconnects.

## Testing

Add integration coverage for per-helper filesystem isolation, stdin
backpressure, buffered output after helper exit, and controller
disconnect while output is blocked.

GitOrigin-RevId: a7f75fdedbe0928ff5b93a412c7223371d0f321a
This commit is contained in:
Charlie Marsh
2026-11-18 20:14:05 +00:00
committed by copyberry
parent 60fcb1649f
commit 097a8a7439
7 changed files with 939 additions and 1 deletions
+2
View File
@@ -27,6 +27,7 @@ doctest = false
workspace = true
[dependencies]
base64 = { workspace = true }
codex-utils-process = { workspace = true }
anyhow = { workspace = true }
chrono = { workspace = true }
@@ -104,6 +105,7 @@ tokio = { workspace = true, features = [
"process",
"rt-multi-thread",
"signal",
"sync",
"time",
] }
toml = { workspace = true }