Arguments, already split — never a shell string, so nothing needs quoting or escaping.
OptionalCancellationAborts the process.
Binary or command to run inside the sandbox.
Environment for the process. Exactly what the agent was granted; never the host's full env.
OptionalWorkingWorking directory inside the sandbox. Defaults to the workspace root.
How to run one command inside a sandbox.
Deliberately NOT modelled on Node's
ChildProcess. Spawning locally anddocker execboth happen to produce a child process, but a Kubernetes exec is streams over a websocket and a remote runner is HTTP — an interface that promisedChildProcesscould never be implemented honestly by either. Promising async iterables of lines instead lets every backend satisfy the same contract.The second benefit is testing: a fake executor replays canned JSONL, so adapter behaviour can be unit-tested without a harness binary, a container, or a network.