openai/codex · error
separate stderr channel should be present
Error message
separate stderr channel should be present
What it means
Sanity guard in the non-TTY pipe spawn path: the caller passed Some(stderr_tx) alongside StderrMode::Separate, so a stderr broadcast channel must exist to pair with the separate stderr read handle; the guard bails when the caller-supplied stderr channel was None, which would orphan the stderr reader thread.
Solutions
- Request a separate stderr channel when starting the exec session; otherwise treat it as an internal bug and retry.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:117 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/4c865fa481018791.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:117
let stdout_join = spawn_output_reader(pipe_handles.stdout_read, stdout_tx);
let Some(stderr_read) = pipe_handles.stderr_read else {
anyhow::bail!("separate stderr handle should be present");
};
let Some(stderr_tx) = stderr_tx else {
anyhow::bail!("separate stderr channel should be present");
};
let stderr_join = spawn_output_reader(stderr_read, stderr_tx);View on GitHub (pinned to 339751715c)