{"record":{"id":"3b122efb7e9e274d","repo":"openai/codex","slug":"expected-exactly-one-client-subscribed-to-the-thre","errorCode":null,"errorMessage":"expected exactly one client subscribed to the thread, found {}","messagePattern":"expected exactly one client subscribed to the thread, found (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server/src/current_time.rs","lineNumber":146,"sourceCode":"            let _canceled = outgoing.cancel_request(&request_id).await;\n            bail!(\n                \"current-time request timed out after {}s\",\n                CURRENT_TIME_REQUEST_TIMEOUT.as_secs()\n            );\n        }\n    };\n    let response: CurrentTimeReadResponse =\n        serde_json::from_value(result).context(\"invalid current-time response\")?;\n\n    DateTime::from_timestamp(response.current_time_at, 0)\n        .ok_or_else(|| anyhow!(\"current-time response is outside the supported range\"))\n}\n\nfn require_single_current_time_connection(connection_ids: &[ConnectionId]) -> Result<ConnectionId> {\n    // External clocks are not interchangeable, so do not choose one silently.\n    match connection_ids {\n        [connection_id] => Ok(*connection_id),\n        _ => bail!(\n            \"expected exactly one client subscribed to the thread, found {}\",\n            connection_ids.len()\n        ),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::require_single_current_time_connection;\n    use crate::outgoing_message::ConnectionId;\n\n    #[test]\n    fn current_time_connection_must_be_unambiguous() {\n        assert_eq!(\n            require_single_current_time_connection(&[ConnectionId(7)]).unwrap(),\n            ConnectionId(7)\n        );\n        assert_eq!(","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server/src/current_time.rs#L128-L164","documentation":"Error \"expected exactly one client subscribed to the thread, found {}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server/src/current_time.rs:146 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"}