openai/codex · error · anyhow::Error
duplicate code cell start for {code_cell_id}
Error message
duplicate code cell start for {code_cell_id} What it means
Error "duplicate code cell start for {code_cell_id}" thrown in openai/codex.
Source
Thrown at codex-rs/rollout-trace/src/reducer/code_cell.rs:97
}
impl TraceReducer {
/// Starts a code cell once its model-visible source item exists.
///
/// Runtime events are allowed to arrive before stream completion has
/// reduced the model output that requested `exec`. Queueing preserves the
/// event order while still requiring every final `CodeCell` to point at the
/// exact conversation item that authored its JavaScript.
pub(super) fn start_or_queue_code_cell(&mut self, pending: PendingCodeCellStart) -> Result<()> {
let code_cell_id = pending.started.code_cell_id.clone();
if self
.source_item_id_for_pending_code_cell(&pending)?
.is_none()
{
if self.rollout.code_cells.contains_key(&code_cell_id)
|| self.pending_code_cell_starts.contains_key(&code_cell_id)
{
bail!("duplicate code cell start for {code_cell_id}");
}
self.pending_code_cell_starts.insert(code_cell_id, pending);
return Ok(());
}
self.start_code_cell(pending)
}
/// Materializes any queued code-cell starts unlocked by newly reduced conversation items.
///
/// This is called after inference and compaction conversation reduction,
/// because those are the only paths that create model-visible items today.
pub(super) fn flush_pending_code_cell_starts(&mut self) -> Result<()> {
let mut ready_ids = Vec::new();
for (code_cell_id, pending) in &self.pending_code_cell_starts {
if self
.source_item_id_for_pending_code_cell(pending)?
.is_some()View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/rollout-trace/src/reducer/code_cell.rs:97 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/a73e79f4fd7babfb.
Report an issue: GitHub.