openai/codex · error · anyhow::Error

compaction installed event

Error message

compaction installed event {compaction_id} did not include a thread id

What it means

A CompactionInstalled event lacked a thread_id on the raw event, so the reducer cannot attribute the compaction to a thread.

Solutions

  1. Ensure the trace producer stamps thread_id on compaction installed events
  2. Infer the thread from the checkpoint payload if possible
Defensive patterns

Strategy: fallback

When it happens

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

Appendix: source

Thrown at codex-rs/rollout-trace/src/reducer/mod.rs:441

                compaction_id,
                compaction_request_id,
                ..
            } => {
                self.complete_compaction_request(
                    event.seq,
                    event.wall_time_unix_ms,
                    compaction_id,
                    compaction_request_id,
                    ExecutionStatus::Failed,
                    /*response_payload*/ None,
                )?;
            }
            RawTraceEventPayload::CompactionInstalled {
                compaction_id,
                checkpoint_payload,
            } => {
                let Some(thread_id) = event.thread_id else {
                    bail!("compaction installed event {compaction_id} did not include a thread id");
                };
                let Some(codex_turn_id) = event.codex_turn_id else {
                    bail!(
                        "compaction installed event {compaction_id} did not include a codex turn id"
                    );
                };
                self.reduce_compaction_installed_event(
                    event.wall_time_unix_ms,
                    thread_id,
                    codex_turn_id,
                    compaction_id,
                    checkpoint_payload,
                )?;
            }
            RawTraceEventPayload::AgentResultObserved {
                edge_id,
                child_thread_id,
                child_codex_turn_id,

View on GitHub (pinned to 339751715c)