{"record":{"id":"3f4ac2442b678131","repo":"openai/codex","slug":"duplicate-tool-call-for-model-visible-call-id-mod","errorCode":null,"errorMessage":"duplicate tool call for model-visible call id {model_visible_call_id}","messagePattern":"duplicate tool call for model-visible call id (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/rollout-trace/src/reducer/tool.rs","lineNumber":422,"sourceCode":"                    turn.thread_id\n                );\n            }\n        }\n        Ok(())\n    }\n\n    fn ensure_unique_model_visible_tool_call(\n        &self,\n        model_visible_call_id: Option<&str>,\n        tool_call_id: &str,\n    ) -> Result<()> {\n        let Some(model_visible_call_id) = model_visible_call_id else {\n            return Ok(());\n        };\n        if let Some(existing) = self.single_tool_for_model_visible_call(model_visible_call_id)?\n            && existing != tool_call_id\n        {\n            bail!(\"duplicate tool call for model-visible call id {model_visible_call_id}\");\n        }\n        Ok(())\n    }\n\n    fn single_tool_for_model_visible_call(\n        &self,\n        model_visible_call_id: &str,\n    ) -> Result<Option<ToolCallId>> {\n        let mut matching = self\n            .rollout\n            .tool_calls\n            .values()\n            .filter(|tool| tool.model_visible_call_id.as_deref() == Some(model_visible_call_id))\n            .map(|tool| tool.tool_call_id.clone());\n        let first = matching.next();\n        if matching.next().is_some() {\n            bail!(\"multiple tool calls matched model-visible call id {model_visible_call_id}\");\n        }","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rollout-trace/src/reducer/tool.rs#L404-L440","documentation":"Error \"duplicate tool call for model-visible call id {model_visible_call_id}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rollout-trace/src/reducer/tool.rs:422 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"}