openai/codex · error · io::Error

proxy client token has multiple registered network proxy…

Error message

proxy client token has multiple registered network proxy route SIDs

What it means

Guard in registered_route_for_sids: the connecting process's token carries more than one SID that matches a registered network proxy route. Attribution must be unambiguous — a client matching multiple routes could be routed to the wrong services — so the connection is rejected with PermissionDenied instead of guessing.

Solutions

  1. Ensure the client process is restricted to exactly one proxy route SID
  2. Avoid nesting memberships that inherit multiple registered route SIDs
  3. Fix route registration so route SIDs stay mutually exclusive
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at codex-rs/network-proxy/src/windows_proxy_ingress.rs:350 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/1b5b797a5ab07741. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/network-proxy/src/windows_proxy_ingress.rs:350

    info!("shared managed Windows {protocol} proxy ingress listening on {addr}");
    listener.serve(dispatcher).await;
}

fn registered_route_for_sids(
    routes: &HashMap<String, Arc<RouteServices>>,
    restricting_sids: &[String],
) -> io::Result<Arc<RouteServices>> {
    let mut matching_routes = restricting_sids
        .iter()
        .filter_map(|sid| routes.get(sid).cloned());
    let route = matching_routes.next().ok_or_else(|| {
        io::Error::new(
            io::ErrorKind::PermissionDenied,
            "proxy client token has no registered network proxy route SID",
        )
    })?;
    if matching_routes.next().is_some() {
        return Err(io::Error::new(
            io::ErrorKind::PermissionDenied,
            "proxy client token has multiple registered network proxy route SIDs",
        ));
    }
    Ok(route)
}

fn random_restricting_sid() -> String {
    let a = rand::random::<u32>();
    let b = rand::random::<u32>();
    let c = rand::random::<u32>();
    let d = rand::random::<u32>();
    format!("S-1-5-21-{a}-{b}-{c}-{d}")
}

#[cfg(test)]
#[path = "windows_proxy_ingress_tests.rs"]
mod tests;

View on GitHub (pinned to 339751715c)