openai/codex · error · io::Error

remote control is disabled by managed requirements

Error message

remote control is disabled by managed requirements

What it means

Policy guard in RemoteControlHandle::ensure_remote_control_allowed_io: any remote-control mutating operation (disable, start_pairing, pairing_status, list_clients, revoke_client) was attempted while the policy is DisabledByRequirements. Managed requirements forbid all remote-control functionality, so the io::Error is returned before contacting any service.

Solutions

  1. Check the policy via ensure_remote_control_allowed before exposing remote-control operations to clients.
  2. Update the managed requirements configuration (administrator action) if remote control should be permitted.
  3. Map this error to a 'disabled by policy' notification for the client UI.
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

            Self::Unavailable(err) => err.fmt(f),
            Self::DisabledByRequirements(err) => err.fmt(f),
        }
    }
}

impl Error for RemoteControlEnableError {}

impl RemoteControlHandle {
    pub fn ensure_remote_control_allowed(&self) -> Result<(), RemoteControlDisabledByRequirements> {
        match self.policy {
            RemoteControlPolicy::Allowed => Ok(()),
            RemoteControlPolicy::DisabledByRequirements => Err(RemoteControlDisabledByRequirements),
        }
    }

    fn ensure_remote_control_allowed_io(&self) -> io::Result<()> {
        self.ensure_remote_control_allowed()
            .map_err(|err| io::Error::new(io::ErrorKind::PermissionDenied, err))
    }

    pub fn enable_ephemeral(
        &self,
    ) -> Result<RemoteControlStatusChangedNotification, RemoteControlEnableError> {
        self.enable_with_preference(/*persistence_preference*/ None)
    }

    fn enable_with_preference(
        &self,
        persistence_preference: Option<bool>,
    ) -> Result<RemoteControlStatusChangedNotification, RemoteControlEnableError> {
        self.ensure_remote_control_allowed()
            .map_err(RemoteControlEnableError::DisabledByRequirements)?;
        if self.state_db.is_none() {
            warn!("remote control cannot be enabled because sqlite state db is unavailable");
            return Err(RemoteControlEnableError::Unavailable(
                RemoteControlUnavailable,

View on GitHub (pinned to 339751715c)