{"record":{"id":"cf9667dd334e9998","repo":"astrid-runtime/astrid","slug":"mcp-gateway-is-only-supported-on-unix-hosts","errorCode":null,"errorMessage":"MCP gateway is only supported on Unix hosts","messagePattern":"MCP gateway is only supported on Unix hosts","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/mcp/mod.rs","lineNumber":68,"sourceCode":"        _workspace: Option<&Path>,\n    ) -> Result<ExitCode> {\n        anyhow::bail!(\"MCP gateway attach is only supported on Unix hosts\")\n    }\n}\nmod elicit;\nmod form_elicitation;\n#[cfg(unix)]\nmod gateway;\n#[cfg(unix)]\nmod idle;\n#[cfg(not(unix))]\nmod gateway {\n    use std::process::ExitCode;\n\n    use anyhow::Result;\n\n    pub(crate) async fn run(_principal: Option<&str>) -> Result<ExitCode> {\n        anyhow::bail!(\"MCP gateway is only supported on Unix hosts\")\n    }\n}\nmod grant;\nmod ingress;\n#[cfg(unix)]\nmod lifecycle;\n#[cfg(not(unix))]\nmod lifecycle {\n    use std::process::ExitCode;\n\n    use anyhow::Result;\n\n    pub(crate) async fn ready(_principal: Option<&str>, _format: &str) -> Result<ExitCode> {\n        anyhow::bail!(\"MCP gateway readiness is only supported on Unix hosts\")\n    }\n\n    pub(crate) async fn stop_gateway() -> Result<()> {\n        Ok(())","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/mcp/mod.rs#L50-L86","documentation":"The MCP gateway itself is Unix-only (Unix domain socket transport). On non-Unix targets a stub `gateway` module is compiled whose run() always fails with this error, keeping the CLI buildable everywhere while making the limitation explicit.","triggerScenarios":"Invoking `astrid mcp gateway ...` (start/run the gateway) on Windows or any non-Unix host.","commonSituations":"Deploying the gateway on Windows servers; running CLI tests on a Windows dev machine; CI runners using Windows images.","solutions":["Run the gateway on Linux or macOS.","Use WSL2 on Windows to host the gateway.","Adjust CI to a Linux runner for gateway tests.","Contribute a Windows-named-pipe transport if cross-platform gateway support is required."],"exampleFix":"// before\n# windows CI job\nrun: astrid mcp gateway start\n// after\nruns-on: ubuntu-latest\nrun: astrid mcp gateway start","handlingStrategy":"validation","validationCode":"if !cfg!(unix) {\n    eprintln!(\"MCP gateway requires Linux or macOS\");\n    std::process::exit(1);\n}","typeGuard":"fn supports_mcp_gateway() -> bool { cfg!(unix) }","tryCatchPattern":"match gateway::run(principal).await {\n    Err(e) if e.to_string().contains(\"only supported on Unix hosts\") =>\n        eprintln!(\"host the gateway on a Unix machine (or WSL2)\"),\n    other => other?,\n}","preventionTips":["Deploy the gateway only to Linux/macOS hosts","Exclude gateway tasks from Windows CI","Document platform requirements for operators","Consider named-pipe transport if Windows support is needed"],"tags":["platform","windows","gateway","unsupported"],"backgroundTag":"unsupported-platform","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}