{"record":{"id":"4c865fa481018791","repo":"openai/codex","slug":"separate-stderr-channel-should-be-present","errorCode":null,"errorMessage":"separate stderr channel should be present","messagePattern":"separate stderr channel should be present","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs","lineNumber":117,"sourceCode":"        let stdout_join = spawn_output_reader(pipe_handles.stdout_read, stdout_tx);\n        let Some(stderr_read) = pipe_handles.stderr_read else {\n            anyhow::bail!(\"separate stderr handle should be present\");\n        };\n        let Some(stderr_tx) = stderr_tx else {\n            anyhow::bail!(\"separate stderr channel should be present\");\n        };\n        let stderr_join = spawn_output_reader(stderr_read, stderr_tx);","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs#L99-L135","documentation":"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.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request a separate stderr channel when starting the exec session; otherwise treat it as an internal bug and retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}