{"record":{"id":"514dde6b6a6c143c","repo":"openai/codex","slug":"remote-control-response-kind-failed-at-url","errorCode":null,"errorMessage":"remote control {response_kind} failed at `{url}`: HTTP {status}, {}, body: {body_preview}","messagePattern":"remote control (.+?) failed at `(.+?)`: HTTP (.+?), (.+?), body: (.+?)","errorType":"http","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-transport/src/transport/remote_control/clients.rs","lineNumber":250,"sourceCode":"}\n\nfn ensure_success_response(\n    status: axum::http::StatusCode,\n    headers: &HeaderMap,\n    url: &Url,\n    body_preview: &str,\n    response_kind: &str,\n) -> io::Result<()> {\n    if status.is_success() {\n        return Ok(());\n    }\n    let error_kind = match status.as_u16() {\n        400 => ErrorKind::InvalidInput,\n        401 | 403 => ErrorKind::PermissionDenied,\n        404 => ErrorKind::NotFound,\n        _ => ErrorKind::Other,\n    };\n    Err(io::Error::new(\n        error_kind,\n        format!(\n            \"remote control {response_kind} failed at `{url}`: HTTP {status}, {}, body: {body_preview}\",\n            format_headers(headers)\n        ),\n    ))\n}\n\nfn environment_clients_url(remote_control_url: &str, environment_id: &str) -> io::Result<Url> {\n    let mut url = normalize_remote_control_base_url(remote_control_url)?\n        .join(\"wham/remote/control/environments\")\n        .map_err(io::Error::other)?;\n    url.path_segments_mut()\n        .map_err(|()| {\n            io::Error::new(\n                ErrorKind::InvalidInput,\n                \"remote control URL cannot be a base\",\n            )","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-transport/src/transport/remote_control/clients.rs#L232-L268","documentation":"Error \"remote control {response_kind} failed at `{url}`: HTTP {status}, {}, body: {body_preview}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server-transport/src/transport/remote_control/clients.rs:250 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"}