openai/codex · error · io::Error
remote control account changed while resolving persisted…
Error message
remote control account changed while resolving persisted preference
What it means
Race guard in resolve-persisted-preference: after loading the persisted enrollment from the state DB, the freshly loaded auth snapshot has a different account id than the one the preference/enrollment was read with. The persisted enrollment belongs to another account, so resolution aborts with this error rather than using the wrong account's enrollment.
Solutions
- Retry resolution so the enrollment is re-read under the now-current account
- Avoid concurrent logins/account switches while remote control is being enabled or connected
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at codex-rs/app-server-transport/src/transport/remote_control/websocket.rs:1629 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/8a13b6b296e58635.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/app-server-transport/src/transport/remote_control/websocket.rs:1629
return Ok(());
}
let _persistence =
acquire_persistence_lock(connect_options.desired_state_persistence_lock).await;
if *connect_options.desired_state_tx.borrow() != durable_enabled {
return Ok(());
}
let enrollment = state_db
.get_remote_control_enrollment(
&remote_control_target.websocket_url,
account_id,
connect_options.app_server_client_name,
)
.await
.map_err(io::Error::other)?;
let current_auth = load_remote_control_auth(auth_manager).await?;
if current_auth.account_id != account_id {
return Err(io::Error::new(
ErrorKind::WouldBlock,
"remote control account changed while resolving persisted preference",
));
}
let resolved_state = desired_state_from_persisted_enrollment(enrollment);
connect_options.desired_state_tx.send_if_modified(|state| {
if *state != durable_enabled || *state == resolved_state {
return false;
}
*state = resolved_state;
true
});
Ok(())
}
fn websocket_response_reports_missing_remote_app_server(
response: &tungstenite::http::Response<Option<Vec<u8>>>,
) -> bool {View on GitHub (pinned to 339751715c)