{"record":{"id":"d9a06a7cc3e06f14","repo":"openai/codex","slug":"unexpected-runner-message-during-capture-other","errorCode":null,"errorMessage":"unexpected runner message during capture: {other:?}","messagePattern":"unexpected runner message during capture: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/elevated_impl.rs","lineNumber":256,"sourceCode":"                    Err(err) => break Err(err),\n                };\n                match msg.message {\n                    Message::SpawnReady { .. } => {}\n                    Message::Output { payload } => match decode_bytes(&payload.data_b64) {\n                        Ok(bytes) => match payload.stream {\n                            OutputStream::Stdout => stdout.extend_from_slice(&bytes),\n                            OutputStream::Stderr => stderr.extend_from_slice(&bytes),\n                        },\n                        Err(err) => {\n                            break Err(err);\n                        }\n                    },\n                    Message::Exit { payload } => break Ok((payload.exit_code, payload.timed_out)),\n                    Message::Error { payload } => {\n                        break Err(anyhow::anyhow!(\"runner error: {}\", payload.message));\n                    }\n                    other => {\n                        break Err(anyhow::anyhow!(\n                            \"unexpected runner message during capture: {other:?}\"\n                        ));\n                    }\n                }\n            };\n            if let Some((cancel_handle, done)) = cancel_writer {\n                done.store(true, Ordering::SeqCst);\n                cancel_handle.thread().unpark();\n                let _ = cancel_handle.join();\n            }\n            drop(pipe_write);\n            let (exit_code, timed_out) = result?;\n\n            if exit_code == 0 {\n                log_success(&command, logs_base_dir);\n            } else {\n                log_failure(&command, &format!(\"exit code {exit_code}\"), logs_base_dir);\n            }","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/elevated_impl.rs#L238-L274","documentation":"Protocol violation during output capture: the runner sent a message variant other than SpawnReady/Output/exit-kind frames that the capture loop expects at this point (e.g., a duplicated SpawnReady or unknown message kind, shown via Debug). Indicates a runner/protocol version mismatch or desynchronized pipe stream.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/elevated_impl.rs:256 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the runner helper binary version matches the library (rerun setup to rematerialize the helper)","If the protocol gained new message kinds, update this match arm to handle them","Tear down and re-establish the runner session on protocol mismatch"],"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"}