openai/codex · error · anyhow::Error
runner {pipe_label} connect thread exited before publishing
Error message
runner {pipe_label} connect thread exited before publishing its handle What it means
Error "runner {pipe_label} connect thread exited before publishing its handle" thrown in openai/codex.
Source
Thrown at codex-rs/windows-sandbox-rs/src/elevated/runner_client.rs:243
let _ = thread_handle_tx.send(Err(anyhow::anyhow!(
"DuplicateHandle failed for runner {pipe_label_for_thread} connect thread: {}",
unsafe { GetLastError() }
)));
return;
}
// Publish the helper thread HANDLE before the blocking pipe connect so the
// parent can cancel this specific operation if it times out.
let _ = thread_handle_tx.send(Ok(thread_handle));
let result = connect_pipe(h_pipe, expected_runner_pid)
.map_err(anyhow::Error::from)
.context(format!("connect {pipe_label_for_thread}"));
let _ = connect_result_tx.send(result);
})?,
);
let thread_handle = thread_handle_rx.recv().map_err(|_| {
anyhow::anyhow!("runner {pipe_label} connect thread exited before publishing its handle")
})??;
let result = match connect_result_rx.recv_timeout(RUNNER_PIPE_CONNECT_TIMEOUT) {
Ok(result) => {
if let Some(connect_thread) = connect_thread.take() {
let _ = connect_thread.join();
}
result
}
Err(mpsc::RecvTimeoutError::Timeout) => {
if let Some(result) = try_take_completed_connect_result(
&mut connect_thread,
&connect_result_rx,
thread_handle,
&pipe_label,
)? {
result
} else {View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/elevated/runner_client.rs:243 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/4e9a92119f3d9a9b.
Report an issue: GitHub.