openai/codex · error · anyhow::Error
shared managed Windows proxy route is already running
Error message
shared managed Windows proxy route is already running
What it means
Windows-only lifecycle guard: an attempt was made to start the shared managed Windows proxy route (the OS-wide SOCKS5 ingress that attributes client processes by restricting SIDs) while it is already running. The shared route is a singleton per manager, so a duplicate start is rejected.
Solutions
- Check is_running() before starting the shared Windows proxy route
- Reuse the existing route rather than registering a second one
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/network-proxy/src/proxy.rs:1376 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/fcf8bb970f00be32.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/network-proxy/src/proxy.rs:1376
let current_cfg = self.state.current_cfg().await?;
if !current_cfg.enabled {
warn!("network.enabled is false; skipping proxy listeners");
return Ok(NetworkProxyHandle::noop());
}
if !cfg!(target_os = "windows") && !unix_socket_permissions_supported() {
warn!(
"allowUnixSockets and dangerouslyAllowAllUnixSockets are macOS-only; requests will be rejected on this platform"
);
}
#[cfg(target_os = "windows")]
if let Some(windows_runtime) = self.windows_runtime.as_ref() {
let mut active_route = windows_runtime
.active_route
.lock()
.unwrap_or_else(std::sync::PoisonError::into_inner);
anyhow::ensure!(
active_route.is_none(),
"shared managed Windows proxy route is already running"
);
*active_route = Some(Arc::new(windows_runtime.ingress.register_route(
windows_runtime.http_service.clone(),
windows_runtime.socks_service.clone(),
)));
drop(active_route);
return Ok(NetworkProxyHandle::windows_shared(
Arc::clone(&windows_runtime.active_route),
Arc::clone(&self.environment_proxies),
));
}
let reserved_listeners = self.reserved_listeners.as_ref();
let http_listener = reserved_listeners.and_then(|listeners| listeners.take_http());
let socks_listener = reserved_listeners.and_then(|listeners| listeners.take_socks());
View on GitHub (pinned to 339751715c)