{"record":{"id":"a44f7388b987c504","repo":"openai/codex","slug":"remote-control-pairing-status-requires-pairingcode","errorCode":null,"errorMessage":"remote control pairing status requires pairingCode or manualPairingCode","messagePattern":"remote control pairing status requires pairingCode or manualPairingCode","errorType":"validation","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-transport/src/transport/remote_control/mod.rs","lineNumber":816,"sourceCode":"    }\n    enroll_remote_control_server(remote_control_target, auth, installation_id, server_name).await\n}\n\nfn remote_control_pairing_status_code(\n    params: &RemoteControlPairingStatusParams,\n) -> io::Result<RemoteControlPairingStatusCode> {\n    match (&params.pairing_code, &params.manual_pairing_code) {\n        (Some(pairing_code), None) => Ok(RemoteControlPairingStatusCode::PairingCode(\n            pairing_code.clone(),\n        )),\n        (None, Some(manual_pairing_code)) => Ok(RemoteControlPairingStatusCode::ManualPairingCode(\n            manual_pairing_code.clone(),\n        )),\n        (Some(_), Some(_)) => Err(io::Error::new(\n            io::ErrorKind::InvalidInput,\n            \"remote control pairing status accepts either pairingCode or manualPairingCode, not both\",\n        )),\n        (None, None) => Err(io::Error::new(\n            io::ErrorKind::InvalidInput,\n            \"remote control pairing status requires pairingCode or manualPairingCode\",\n        )),\n    }\n}\n\nasync fn refresh_pairing_enrollment(\n    current_enrollment: &mut Option<RemoteControlEnrollment>,\n    auth_manager: &Arc<AuthManager>,\n    auth: &mut auth::RemoteControlConnectionAuth,\n    installation_id: &str,\n    enrollment: &mut RemoteControlEnrollment,\n) -> io::Result<()> {\n    let mut refresh_result = refresh_remote_control_server(auth, installation_id, enrollment).await;\n    if refresh_result\n        .as_ref()\n        .is_err_and(|err| err.kind() == io::ErrorKind::PermissionDenied)\n    {","sourceCodeStart":798,"sourceCodeEnd":834,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-transport/src/transport/remote_control/mod.rs#L798-L834","documentation":"Validation error from remote_control_pairing_status_code: neither pairingCode nor manualPairingCode was provided in the pairing-status params. At least one code is required to identify the pairing attempt, so the request fails input validation.","triggerScenarios":"Thrown at codex-rs/app-server-transport/src/transport/remote_control/mod.rs:816 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Populate either pairingCode or manualPairingCode from the pairing response before polling status","Reject the call early in the client with a required-field validation error"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}