{"record":{"id":"0b575640e9912a22","repo":"nikivdev/code","slug":"supervisor-ipc-is-only-supported-on-unix-platforms","errorCode":null,"errorMessage":"Supervisor IPC is only supported on unix platforms right now.","messagePattern":"Supervisor IPC is only supported on unix platforms right now\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/supervisor.rs","lineNumber":381,"sourceCode":"    if let Some(parent) = socket_path.parent() {\n        fs::create_dir_all(parent)?;\n    }\n\n    if socket_path.exists() {\n        if supervisor_running(socket_path) {\n            println!(\"Supervisor already running; exiting.\");\n            return Ok(());\n        }\n        fs::remove_file(socket_path).ok();\n    }\n\n    #[cfg(unix)]\n    let listener = std::os::unix::net::UnixListener::bind(socket_path)\n        .with_context(|| format!(\"failed to bind {}\", socket_path.display()))?;\n\n    #[cfg(not(unix))]\n    {\n        bail!(\"Supervisor IPC is only supported on unix platforms right now.\");\n    }\n\n    let state = Arc::new(Mutex::new(SupervisorState::default()));\n    let bootstrap_state = Arc::clone(&state);\n    let initial_active_path = resolve_active_project_config_path();\n    std::thread::spawn(move || {\n        if let Err(err) = bootstrap_daemons(&bootstrap_state, initial_active_path.as_deref(), boot)\n        {\n            eprintln!(\"WARN supervisor bootstrap failed: {err}\");\n        }\n        if let Err(err) = monitor_daemons(bootstrap_state) {\n            eprintln!(\"WARN supervisor monitor failed: {err}\");\n        }\n    });\n\n    #[cfg(unix)]\n    {\n        for stream in listener.incoming() {","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/supervisor.rs#L363-L399","documentation":"run_server implements the supervisor's IPC server using UnixListener, which is only compiled on unix targets (#[cfg(unix)]). On non-unix platforms (e.g. Windows) the cfg(not(unix)) branch unconditionally bails with this message, since no alternative IPC transport is implemented.","triggerScenarios":"Running the supervisor server command (run_server, via run) on a non-unix platform — Windows builds always hit this; there is no input that avoids it.","commonSituations":"Developer runs the supervisor on Windows; CI job on a Windows runner; cross-platform team where docs assume macOS/Linux only.","solutions":["Run the supervisor on macOS or Linux (WSL2 works for Windows users).","Use a Windows CI runner with a Linux container/WSL step for supervisor-dependent commands.","Wait for/raise an issue requesting a Windows named-pipe IPC transport."],"exampleFix":"// before (Windows PowerShell)\nmyapp supervisor serve\n// error: only supported on unix\n// after\nwsl myapp supervisor serve","handlingStrategy":"validation","validationCode":"import * as os from 'node:os';\nif (os.platform() === 'win32') {\n  console.error('Supervisor IPC requires unix; use WSL2 or a Linux/macOS host.');\n  process.exit(1);\n}","typeGuard":"function isUnixPlatform(): boolean {\n  return process.platform !== 'win32';\n}","tryCatchPattern":"try {\n  await supervisorServe();\n} catch (e) {\n  if (String(e).includes('only supported on unix platforms')) {\n    console.error('This command is unix-only. Re-run inside WSL2/Linux/macOS.');\n    return;\n  }\n  throw e;\n}","preventionTips":["Gate supervisor-dependent workflows behind a platform check on Windows.","Document unix-only support in team onboarding and CI configuration.","Use WSL2 or Linux containers for Windows development.","Avoid Windows CI runners for jobs that require the supervisor."],"tags":["platform","windows","unix","ipc","unsupported"],"backgroundTag":"unsupported-platform","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}