openai/codex · error · io::Error
remote control disabled after account changed
Error message
remote control disabled after account changed
What it means
Guard outcome in the websocket connect flow: while preparing/refreshing enrollment the authenticated account id changed compared to the cached enrollment. The in-memory enrollment is cleared, a status update is published, and this message explains that remote control was disabled because the credential no longer matches the enrolled account.
Solutions
- Let the connection re-enroll under the new account on the next connect cycle
- Ensure only one account is logged in per state DB, or re-enable remote control after intentional account switches
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at codex-rs/app-server-transport/src/transport/remote_control/websocket.rs:1489 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/0de90e34592ce463.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/app-server-transport/src/transport/remote_control/websocket.rs:1489
state_db,
remote_control_target,
auth_context.auth_manager,
&auth.account_id,
connect_options,
)
.await?;
info!(
"clearing in-memory remote control enrollment because account id changed: websocket_url={}, previous_account_id={:?}, current_account_id={:?}",
remote_control_target.websocket_url,
enrollment
.as_ref()
.map(|enrollment| enrollment.account_id.as_str()),
auth.account_id
);
*enrollment = None;
status_publisher.publish_environment_id(/*environment_id*/ None);
if !connect_options.desired_state_tx.borrow().is_enabled() {
return Err(io::Error::new(
ErrorKind::Interrupted,
"remote control disabled after account changed",
));
}
}
if let Some(enrollment) = enrollment.as_mut() {
enrollment.remote_control_target = remote_control_target.clone();
}
if let Some(enrollment) = enrollment.as_ref() {
status_publisher.publish_environment_id(Some(enrollment.environment_id.clone()));
}
if enrollment.is_none() {
let loaded_enrollment = load_persisted_remote_control_enrollment(
Some(state_db),
remote_control_target,
&auth.account_id,View on GitHub (pinned to 339751715c)