openai/codex · error · io::Error

remote control pairing requires remote control to be enabled

Error message

remote control pairing requires remote control to be enabled

What it means

Guard error from pairing_disabled_error: a pairing operation (e.g. pairing a client) was requested while the persisted remote-control preference is disabled. Pairing is only legal once remote control has been enabled, so the request is rejected before any network call.

Solutions

  1. Enable remote control first (set the preference and persist it), then retry the pairing request
  2. Check the remote-control status/enablement via the status API before invoking pairing endpoints
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/app-server-transport/src/transport/remote_control/mod.rs:739 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/bd900d795475c761. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/app-server-transport/src/transport/remote_control/mod.rs:739

        &self,
        params: RemoteControlClientsListParams,
    ) -> io::Result<RemoteControlClientsListResponse> {
        self.ensure_remote_control_allowed_io()?;
        clients::list_remote_control_clients(&self.remote_control_url, &self.auth_manager, params)
            .await
    }

    pub async fn revoke_client(
        &self,
        params: RemoteControlClientsRevokeParams,
    ) -> io::Result<RemoteControlClientsRevokeResponse> {
        self.ensure_remote_control_allowed_io()?;
        clients::revoke_remote_control_client(&self.remote_control_url, &self.auth_manager, params)
            .await
    }

    fn pairing_disabled_error() -> io::Error {
        io::Error::new(
            io::ErrorKind::InvalidInput,
            "remote control pairing requires remote control to be enabled",
        )
    }

    fn publish_status(
        &self,
        connection_status: RemoteControlConnectionStatus,
    ) -> RemoteControlStatusChangedNotification {
        let mut status_change = None;
        self.status_tx.send_if_modified(|status| {
            let next_status =
                remote_control_status_with_connection_status(status, connection_status);
            if *status == next_status {
                return false;
            }

            status_change = Some((status.clone(), next_status.clone()));

View on GitHub (pinned to 339751715c)