{"record":{"id":"b57595954c15a11a","repo":"openai/codex","slug":"invalid-remote-control-url-remote-control-url-b57595","errorCode":null,"errorMessage":"invalid remote control URL `{remote_control_url}`; expected HTTPS URL for chatgpt.com or chatgpt-staging.com, or HTTP/HTTPS URL for localhost","messagePattern":"invalid remote control URL `(.+?)`; expected HTTPS URL for chatgpt\\.com or chatgpt-staging\\.com, or HTTP/HTTPS URL for localhost","errorType":"validation","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-transport/src/transport/remote_control/protocol.rs","lineNumber":268,"sourceCode":"\n    Ok(RemoteControlTarget {\n        websocket_url: websocket_url.to_string(),\n        enroll_url: enroll_url.to_string(),\n        refresh_url: refresh_url.to_string(),\n        pair_url: pair_url.to_string(),\n        pair_status_url: pair_status_url.to_string(),\n    })\n}\n\npub(super) fn normalize_remote_control_base_url(remote_control_url: &str) -> io::Result<Url> {\n    let map_url_parse_error = |err: url::ParseError| -> io::Error {\n        io::Error::new(\n            ErrorKind::InvalidInput,\n            format!(\"invalid remote control URL `{remote_control_url}`: {err}\"),\n        )\n    };\n    let map_scheme_error = |_: ()| -> io::Error {\n        io::Error::new(\n            ErrorKind::InvalidInput,\n            format!(\n                \"invalid remote control URL `{remote_control_url}`; expected HTTPS URL for chatgpt.com or chatgpt-staging.com, or HTTP/HTTPS URL for localhost\"\n            ),\n        )\n    };\n\n    let mut remote_control_url = Url::parse(remote_control_url).map_err(map_url_parse_error)?;\n    if !remote_control_url.path().ends_with('/') {\n        let normalized_path = format!(\"{}/\", remote_control_url.path());\n        remote_control_url.set_path(&normalized_path);\n    }\n\n    let host = remote_control_url.host();\n    match remote_control_url.scheme() {\n        \"https\" if is_localhost(&host) || is_allowed_remote_control_chatgpt_host(&host) => {}\n        \"http\" if is_localhost(&host) => {}\n        _ => return Err(map_scheme_error(())),","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-transport/src/transport/remote_control/protocol.rs#L250-L286","documentation":"Error \"invalid remote control URL `{remote_control_url}`; expected HTTPS URL for chatgpt.com or chatgpt-staging.com, or HTTP/HTTPS URL for localhost\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server-transport/src/transport/remote_control/protocol.rs:268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}