openai/codex · error · anyhow::Error

duplicate code cell start for {}

Error message

duplicate code cell start for {}

What it means

Error "duplicate code cell start for {}" thrown in openai/codex.

Source

Thrown at codex-rs/rollout-trace/src/reducer/code_cell.rs:140

            let Some(pending) = self.pending_code_cell_starts.remove(&code_cell_id) else {
                continue;
            };
            self.start_code_cell(pending)?;
        }
        Ok(())
    }

    /// Inserts the reduced `CodeCell` once source ownership can be proven.
    fn start_code_cell(&mut self, pending: PendingCodeCellStart) -> Result<()> {
        let PendingCodeCellStart {
            seq,
            wall_time_unix_ms,
            thread_id,
            codex_turn_id,
            started,
        } = pending;
        if self.rollout.code_cells.contains_key(&started.code_cell_id) {
            bail!("duplicate code cell start for {}", started.code_cell_id);
        }

        let Some(codex_turn_id) = codex_turn_id else {
            bail!(
                "code cell start {} did not include a Codex turn id",
                started.code_cell_id
            );
        };
        self.validate_code_cell_turn(&thread_id, &codex_turn_id)?;

        let source_item_id = self.source_item_id_for_code_cell_start(
            &thread_id,
            &started.code_cell_id,
            &started.model_visible_call_id,
        )?;
        let output_item_ids = self.model_visible_code_cell_item_ids(
            &thread_id,
            &started.model_visible_call_id,

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/rollout-trace/src/reducer/code_cell.rs:140 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/3f5ec408dd5dca2b. Report an issue: GitHub.