{"record":{"id":"f0cabbd8b1d7095a","repo":"openai/codex","slug":"tool-runtime-end-referenced-unknown-call-tool-cal","errorCode":null,"errorMessage":"tool runtime end referenced unknown call {tool_call_id}","messagePattern":"tool runtime end referenced unknown call (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/rollout-trace/src/reducer/tool.rs","lineNumber":306,"sourceCode":"        if terminal_operation_id.is_some() {\n            self.sync_terminal_model_observation(&tool_call_id)?;\n        }\n        self.start_agent_interaction_from_runtime(&tool_call_id, &runtime_payload)?;\n        Ok(())\n    }\n\n    /// Records a runtime-end observation for an already started tool call.\n    pub(super) fn end_tool_runtime_observation(\n        &mut self,\n        seq: RawEventSeq,\n        wall_time_unix_ms: i64,\n        tool_call_id: ToolCallId,\n        status: ExecutionStatus,\n        runtime_payload: RawPayloadRef,\n    ) -> Result<()> {\n        let (thread_id, terminal_operation_id) = {\n            let Some(tool_call) = self.rollout.tool_calls.get_mut(&tool_call_id) else {\n                bail!(\"tool runtime end referenced unknown call {tool_call_id}\");\n            };\n            push_unique(\n                &mut tool_call.raw_runtime_payload_ids,\n                &runtime_payload.raw_payload_id,\n            );\n            (\n                tool_call.thread_id.clone(),\n                tool_call.terminal_operation_id.clone(),\n            )\n        };\n\n        if let Some(operation_id) = terminal_operation_id {\n            self.end_terminal_operation(\n                seq,\n                wall_time_unix_ms,\n                &thread_id,\n                &operation_id,\n                status,","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rollout-trace/src/reducer/tool.rs#L288-L324","documentation":"Error \"tool runtime end referenced unknown call {tool_call_id}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rollout-trace/src/reducer/tool.rs:306 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"}