{"record":{"id":"21ce0c07691118d1","repo":"openai/codex","slug":"duplicate-code-mode-request-id-request-id","errorCode":null,"errorMessage":"duplicate code-mode request ID {request_id:?}","messagePattern":"duplicate code-mode request ID (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/code-mode-host/src/lib.rs","lineNumber":704,"sourceCode":"    kind: RequestKind,\n    cancellation: CancellationToken,\n}\n\n#[derive(Default)]\nstruct RequestRegistry {\n    active: HashMap<RequestId, ActiveRequest>,\n    recent: HashSet<RequestId>,\n    recent_order: VecDeque<RequestId>,\n}\n\nimpl RequestRegistry {\n    fn start(\n        &mut self,\n        request_id: RequestId,\n        kind: RequestKind,\n    ) -> Result<CancellationToken, anyhow::Error> {\n        if self.active.contains_key(&request_id) || self.recent.contains(&request_id) {\n            anyhow::bail!(\"duplicate code-mode request ID {request_id:?}\");\n        }\n        let cancellation = CancellationToken::new();\n        self.active.insert(\n            request_id,\n            ActiveRequest {\n                kind,\n                cancellation: cancellation.clone(),\n            },\n        );\n        Ok(cancellation)\n    }\n\n    fn cancel(&mut self, request_id: RequestId) {\n        if let Some(request) = self.active.get(&request_id)\n            && request.kind.is_cancellable()\n        {\n            request.cancellation.cancel();\n        }","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/code-mode-host/src/lib.rs#L686-L722","documentation":"Error \"duplicate code-mode request ID {request_id:?}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/code-mode-host/src/lib.rs:704 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"}