{"record":{"id":"9a45421e92fae741","repo":"openai/codex","slug":"separate-stderr-handle-should-be-present","errorCode":null,"errorMessage":"separate stderr handle should be present","messagePattern":"separate stderr handle should be present","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs","lineNumber":114,"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":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs#L96-L132","documentation":"Sanity guard in the non-TTY pipe spawn path: spawn_process_with_pipes was requested with StderrMode::Separate, so it must return a stderr read handle; the guard bails when that contract is violated (the pipe-spawning helper failed to allocate/return the separate stderr pipe handle).","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/unified_exec/backends/legacy.rs:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request a separate stderr pipe when starting the exec session instead of merging stderr into stdout; 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"}