{"record":{"id":"a73e79f4fd7babfb","repo":"openai/codex","slug":"duplicate-code-cell-start-for-code-cell-id","errorCode":null,"errorMessage":"duplicate code cell start for {code_cell_id}","messagePattern":"duplicate code cell start for (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rollout-trace/src/reducer/code_cell.rs","lineNumber":97,"sourceCode":"}\n\nimpl TraceReducer {\n    /// Starts a code cell once its model-visible source item exists.\n    ///\n    /// Runtime events are allowed to arrive before stream completion has\n    /// reduced the model output that requested `exec`. Queueing preserves the\n    /// event order while still requiring every final `CodeCell` to point at the\n    /// exact conversation item that authored its JavaScript.\n    pub(super) fn start_or_queue_code_cell(&mut self, pending: PendingCodeCellStart) -> Result<()> {\n        let code_cell_id = pending.started.code_cell_id.clone();\n        if self\n            .source_item_id_for_pending_code_cell(&pending)?\n            .is_none()\n        {\n            if self.rollout.code_cells.contains_key(&code_cell_id)\n                || self.pending_code_cell_starts.contains_key(&code_cell_id)\n            {\n                bail!(\"duplicate code cell start for {code_cell_id}\");\n            }\n            self.pending_code_cell_starts.insert(code_cell_id, pending);\n            return Ok(());\n        }\n\n        self.start_code_cell(pending)\n    }\n\n    /// Materializes any queued code-cell starts unlocked by newly reduced conversation items.\n    ///\n    /// This is called after inference and compaction conversation reduction,\n    /// because those are the only paths that create model-visible items today.\n    pub(super) fn flush_pending_code_cell_starts(&mut self) -> Result<()> {\n        let mut ready_ids = Vec::new();\n        for (code_cell_id, pending) in &self.pending_code_cell_starts {\n            if self\n                .source_item_id_for_pending_code_cell(pending)?\n                .is_some()","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rollout-trace/src/reducer/code_cell.rs#L79-L115","documentation":"Error \"duplicate code cell start for {code_cell_id}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rollout-trace/src/reducer/code_cell.rs:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}