openai/codex · error · anyhow::Error
timed out waiting for state db backfill at {} after {:?} (st
Error message
timed out waiting for state db backfill at {} after {:?} (status: {}) What it means
Error "timed out waiting for state db backfill at {} after {:?} (status: {})" thrown in openai/codex.
Source
Thrown at codex-rs/rollout/src/state_db.rs:170
codex_home,
default_model_provider_id,
backfill_lease_seconds,
)
.await;
} else {
metadata::backfill_sessions(runtime, codex_home, default_model_provider_id).await;
}
let backfill_state = runtime.get_backfill_state().await.map_err(|err| {
anyhow::anyhow!(
"failed to read backfill state at {} after startup backfill: {err}",
codex_home.display()
)
})?;
if backfill_state.status == codex_state::BackfillStatus::Complete {
return Ok(());
}
if wait_started.elapsed() >= STARTUP_BACKFILL_WAIT_TIMEOUT {
return Err(anyhow::anyhow!(
"timed out waiting for state db backfill at {} after {:?} (status: {})",
codex_home.display(),
STARTUP_BACKFILL_WAIT_TIMEOUT,
backfill_state.status.as_str()
));
}
let message = format!(
"state db backfill is {} at {}; waiting up to {:?} before retrying startup initialization",
backfill_state.status.as_str(),
codex_home.display(),
STARTUP_BACKFILL_WAIT_TIMEOUT,
);
if reported_wait {
info!("{message}");
} else {
emit_startup_warning(&message);
reported_wait = true;View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/rollout/src/state_db.rs:170 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/98b145502f027993.
Report an issue: GitHub.