openai/codex · error · anyhow::Error
inference start {inference_call_id} used thread {thread_id},
Error message
inference start {inference_call_id} used thread {thread_id}, but codex turn {codex_turn_id} belongs to {} What it means
Error "inference start {inference_call_id} used thread {thread_id}, but codex turn {codex_turn_id} belongs to {}" thrown in openai/codex.
Source
Thrown at codex-rs/rollout-trace/src/reducer/inference.rs:63
.contains_key(&started.inference_call_id)
{
bail!(
"duplicate inference start for {}",
started.inference_call_id
);
}
let inference_call_id = started.inference_call_id.clone();
let thread_id = started.thread_id.clone();
let codex_turn_id = started.codex_turn_id.clone();
let request_payload = started.request_payload.clone();
let Some(turn) = self.rollout.codex_turns.get(&codex_turn_id) else {
bail!(
"inference start {inference_call_id} referenced unknown codex turn {codex_turn_id}"
);
};
if turn.thread_id != thread_id {
bail!(
"inference start {inference_call_id} used thread {thread_id}, \
but codex turn {codex_turn_id} belongs to {}",
turn.thread_id
);
}
let request_item_ids = self.reduce_inference_request(
wall_time_unix_ms,
&inference_call_id,
&thread_id,
&codex_turn_id,
&request_payload,
)?;
self.thread_mut(&thread_id)?;
self.rollout.inference_calls.insert(
inference_call_id.clone(),View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/rollout-trace/src/reducer/inference.rs:63 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/a65ef22cc022a14e.
Report an issue: GitHub.