openai/codex · error · anyhow::Error

compaction install {compaction_id} referenced unknown codex

Error message

compaction install {compaction_id} referenced unknown codex turn {codex_turn_id}

What it means

Error "compaction install {compaction_id} referenced unknown codex turn {codex_turn_id}" thrown in openai/codex.

Source

Thrown at codex-rs/rollout-trace/src/reducer/compaction.rs:130

    /// Installs a compaction checkpoint into the reduced conversation graph.
    ///
    /// This is the semantic boundary where replacement history becomes the live
    /// thread history; request attempts alone do not imply that change.
    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

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/rollout-trace/src/reducer/compaction.rs:130 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/bfe25fdd9b27ed6f. Report an issue: GitHub.