pub async fn stream_exec_cancellable<C, F>(
codex: &Codex,
cmd: &ExecCommand,
cancel: C,
handler: F,
) -> Result<()>Expand description
Stream JSONL events until the command completes or cancel resolves.
Cancellation terminates the owned process group, waits through the
client’s configured grace period, and reaps the direct child before
returning Error::Cancelled.