openai/codex · error · anyhow::Error
compaction install {compaction_id} used thread {thread_id},
Error message
compaction install {compaction_id} used thread {thread_id}, but codex turn {codex_turn_id} belongs to {} What it means
Error "compaction install {compaction_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/compaction.rs:135
pub(super) fn reduce_compaction_installed_event(
&mut self,
wall_time_unix_ms: i64,
thread_id: String,
codex_turn_id: String,
compaction_id: String,
checkpoint_payload: RawPayloadRef,
) -> Result<()> {
if self.rollout.compactions.contains_key(&compaction_id) {
bail!("duplicate compaction install for {compaction_id}");
}
self.thread_mut(&thread_id)?;
let Some(turn) = self.rollout.codex_turns.get(&codex_turn_id) else {
bail!(
"compaction install {compaction_id} referenced unknown codex turn {codex_turn_id}"
);
};
if turn.thread_id != thread_id {
bail!(
"compaction install {compaction_id} used thread {thread_id}, but codex turn {codex_turn_id} belongs to {}",
turn.thread_id
);
}
let checkpoint = self.reduce_compaction_checkpoint(
wall_time_unix_ms,
&thread_id,
codex_turn_id.as_str(),
&compaction_id,
&checkpoint_payload,
)?;
let request_ids = self
.rollout
.compaction_requests
.values()
.filter(|request| request.compaction_id == compaction_id)
.map(|request| request.compaction_request_id.clone())
.collect();View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/rollout-trace/src/reducer/compaction.rs:135 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/599a2876541847e4.
Report an issue: GitHub.