openai/codex · error · io::Error

remote control disabled during enrollment

Error message

remote control disabled during enrollment

What it means

Outcome in the enrollment flow when the desired state changed to disabled while an enroll/refresh request was in flight. The persisted preference is reconciled with the new disabled state instead of persisting an enrollment the user no longer wants; the message records that enrollment was discarded mid-flight.

Solutions

  1. Accept the state change and let the disable path publish the Disabled status
  2. Re-enable remote control to trigger a new enrollment cycle if the disable was unintended
Defensive patterns

Strategy: fallback

When it happens

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

Appendix: source

Thrown at codex-rs/app-server-transport/src/transport/remote_control/websocket.rs:1768

                    auth_context.recovery.auth_recovery,
                    auth_context.recovery.auth_change_rx,
                )
                .await =>
        {
            return Err(io::Error::other(format!(
                "{err}; retrying after auth recovery"
            )));
        }
        Err(err) => return Err(err),
    };
    let _persistence =
        acquire_persistence_lock(connect_options.desired_state_persistence_lock).await;
    let persistence_preference = match *connect_options.desired_state_tx.borrow() {
        RemoteControlDesiredState::Enabled {
            persistence_preference,
        } => persistence_preference,
        RemoteControlDesiredState::Unknown | RemoteControlDesiredState::Disabled => {
            return Err(io::Error::new(
                ErrorKind::Interrupted,
                "remote control disabled during enrollment",
            ));
        }
    };
    if let Err(err) = update_persisted_remote_control_enrollment(
        Some(state_db),
        remote_control_target,
        &auth_context.auth.account_id,
        connect_options.app_server_client_name,
        Some(&new_enrollment),
        persistence_preference,
    )
    .await
    {
        return Err(io::Error::other(format!(
            "failed to persist remote control enrollment in sqlite state db: {err}"
        )));

View on GitHub (pinned to 339751715c)