openai/codex · error · io::Error
io::ErrorKind::InvalidInput
io::ErrorKind::InvalidInput
Error message
remote control URL cannot be a base
What it means
URL construction error in environment_clients_url: the normalized remote-control base URL is a URL 'cannot-be-a-base' form (e.g. a mailto: or bare opaque URL), so relative segments like wham/remote/control/environments cannot be joined onto it. The configured remote control URL is not an HTTP(S) base URL.
Solutions
- Correct the remote-control base URL configuration to an absolute http(s) URL (e.g. https://remote-control.example.com).
- Validate the URL scheme at configuration load time to fail earlier with a clearer message.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/app-server-transport/src/transport/remote_control/clients.rs:265 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/54504801896923db.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/app-server-transport/src/transport/remote_control/clients.rs:265
404 => ErrorKind::NotFound,
_ => ErrorKind::Other,
};
Err(io::Error::new(
error_kind,
format!(
"remote control {response_kind} failed at `{url}`: HTTP {status}, {}, body: {body_preview}",
format_headers(headers)
),
))
}
fn environment_clients_url(remote_control_url: &str, environment_id: &str) -> io::Result<Url> {
let mut url = normalize_remote_control_base_url(remote_control_url)?
.join("wham/remote/control/environments")
.map_err(io::Error::other)?;
url.path_segments_mut()
.map_err(|()| {
io::Error::new(
ErrorKind::InvalidInput,
"remote control URL cannot be a base",
)
})?
.push(environment_id)
.push("clients");
Ok(url)
}
impl TryFrom<RemoteControlClientResponse> for RemoteControlClient {
type Error = io::Error;
fn try_from(client: RemoteControlClientResponse) -> Result<Self, Self::Error> {
Ok(Self {
client_id: client.client_id,
display_name: client.display_name,
device_type: client.device_type,
platform: client.platform,View on GitHub (pinned to 339751715c)