{"record":{"id":"b6613aea2a92fbc0","repo":"openai/codex","slug":"duplicate-tool-call-start-for-tool-call-id","errorCode":null,"errorMessage":"duplicate tool call start for {tool_call_id}","messagePattern":"duplicate tool call start for (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rollout-trace/src/reducer/tool.rs","lineNumber":58,"sourceCode":"    pub(super) invocation_payload: Option<RawPayloadRef>,\n}\n\nimpl TraceReducer {\n    /// Starts a tool call and links it to model-visible items or runtime parents when available.\n    ///\n    /// Some tools also create richer domain objects, such as terminal operations, from\n    /// the same invocation payload. The generic ToolCall remains the common index.\n    pub(super) fn start_tool_call(\n        &mut self,\n        seq: RawEventSeq,\n        wall_time_unix_ms: i64,\n        thread_id: Option<String>,\n        codex_turn_id: Option<String>,\n        started: ToolCallStarted,\n    ) -> Result<()> {\n        let tool_call_id = started.tool_call_id.clone();\n        if self.rollout.tool_calls.contains_key(&tool_call_id) {\n            bail!(\"duplicate tool call start for {tool_call_id}\");\n        }\n        self.ensure_unique_model_visible_tool_call(\n            started.model_visible_call_id.as_deref(),\n            &tool_call_id,\n        )?;\n\n        let thread_id = self.tool_thread_id(thread_id, codex_turn_id.as_deref())?;\n        self.validate_tool_turn(&thread_id, codex_turn_id.as_deref())?;\n\n        let model_visible_call_id = started.model_visible_call_id.clone();\n        let requester = self.reduce_tool_call_requester(&thread_id, started.requester.clone())?;\n        let model_visible_call_item_ids = model_visible_call_id\n            .as_deref()\n            .map(|call_id| {\n                self.model_visible_tool_item_ids(\n                    &thread_id,\n                    call_id,\n                    &[","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rollout-trace/src/reducer/tool.rs#L40-L76","documentation":"Error \"duplicate tool call start for {tool_call_id}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rollout-trace/src/reducer/tool.rs:58 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"}