openai/codex · error · io::Error
remote control pairing status accepts either pairingCode or…
Error message
remote control pairing status accepts either pairingCode or manualPairingCode, not both
What it means
Validation error from remote_control_pairing_status_code: the pairing-status params supplied both pairingCode and manualPairingCode. The lookup key is mutually exclusive, so the request is rejected as ambiguous input rather than guessing which code to use.
Solutions
- Send only one of pairingCode or manualPairingCode in the request params
- Validate the params client-side before calling pairing_status
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at codex-rs/app-server-transport/src/transport/remote_control/mod.rs:812 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/508c1031335804d8.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/app-server-transport/src/transport/remote_control/mod.rs:812
.await
.map_err(|_| pairing_unavailable_error())?;
}
Err(err) => return Err(err),
}
enroll_remote_control_server(remote_control_target, auth, installation_id, server_name).await
}
fn remote_control_pairing_status_code(
params: &RemoteControlPairingStatusParams,
) -> io::Result<RemoteControlPairingStatusCode> {
match (¶ms.pairing_code, ¶ms.manual_pairing_code) {
(Some(pairing_code), None) => Ok(RemoteControlPairingStatusCode::PairingCode(
pairing_code.clone(),
)),
(None, Some(manual_pairing_code)) => Ok(RemoteControlPairingStatusCode::ManualPairingCode(
manual_pairing_code.clone(),
)),
(Some(_), Some(_)) => Err(io::Error::new(
io::ErrorKind::InvalidInput,
"remote control pairing status accepts either pairingCode or manualPairingCode, not both",
)),
(None, None) => Err(io::Error::new(
io::ErrorKind::InvalidInput,
"remote control pairing status requires pairingCode or manualPairingCode",
)),
}
}
async fn refresh_pairing_enrollment(
current_enrollment: &mut Option<RemoteControlEnrollment>,
auth_manager: &Arc<AuthManager>,
auth: &mut auth::RemoteControlConnectionAuth,
installation_id: &str,
enrollment: &mut RemoteControlEnrollment,
) -> io::Result<()> {
let mut refresh_result = refresh_remote_control_server(auth, installation_id, enrollment).await;View on GitHub (pinned to 339751715c)