openai/codex · error · anyhow::Error
timed out after ms waiting for runner spawn_ready
Error message
timed out after {}ms waiting for runner spawn_ready What it means
Bailed by the elevated runner client when the named-pipe wait for the freshly spawned runner's spawn_ready frame exceeds the given millisecond budget (the frame never fully arrived). Indicates a hung runner startup; the caller treats the runner as unresponsive.
Solutions
- Increase the spawn_ready timeout
- Check whether the runner is hung during initialization (inspect its logs)
- Kill and respawn the runner with a fresh pipe pair
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at codex-rs/windows-sandbox-rs/src/elevated/runner_client.rs:479 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/05ed09ee62c9b8f1.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/windows-sandbox-rs/src/elevated/runner_client.rs:479
if ok == 0 {
let err = unsafe { GetLastError() } as i32;
return Err(anyhow::anyhow!(
"PeekNamedPipe failed while waiting for spawn_ready: {err}"
));
}
if bytes_read == len_buf.len() as u32 {
let frame_len = u32::from_le_bytes(len_buf) as usize;
let total_len = frame_len
.checked_add(len_buf.len())
.ok_or_else(|| anyhow::anyhow!("runner frame length overflow"))?;
if total_available as usize >= total_len {
return Ok(());
}
}
if Instant::now() >= deadline {
return Err(anyhow::anyhow!(
"timed out after {}ms waiting for runner spawn_ready",
timeout.as_millis()
));
}
std::thread::sleep(RUNNER_SPAWN_READY_POLL_INTERVAL);
}
}
#[cfg(test)]
mod tests {
use super::RunnerLogonError;
use super::RunnerStartupError;
use super::is_refreshable_sandbox_creds_error;
use crate::ipc_framed::ErrorPayload;
use crate::ipc_framed::ErrorStage;
use pretty_assertions::assert_eq;
use windows_sys::Win32::Foundation::ERROR_LOGON_FAILURE;View on GitHub (pinned to 339751715c)