{"record":{"id":"ca1ecc973756fdc7","repo":"tinyhumansai/openhuman","slug":"command-was-not-found-on-openhuman-s-path-ins","errorCode":null,"errorMessage":"`{command}` was not found on OpenHuman's PATH. Install it (or its runtime) and make sure it's available in your shell, then restart OpenHuman.","messagePattern":"`(.+?)` was not found on OpenHuman's PATH\\. Install it \\(or its runtime\\) and make sure it's available in your shell, then restart OpenHuman\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/config_servers/stdio.rs","lineNumber":101,"sourceCode":"            command.env(key, value);\n        }\n\n        // Resolve the command up front so a missing Node/uv runtime fails with\n        // actionable guidance instead of a bare ENOENT from `spawn`.\n        let effective_path = self\n            .env\n            .iter()\n            .rev()\n            .find(|(key, _)| key == \"PATH\")\n            .map(|(_, value)| value.as_str())\n            .unwrap_or(resolved_path.as_str());\n        if spawn_env::locate_command(&self.command, effective_path, self.cwd.as_deref()).is_none() {\n            tracing::warn!(\n                target: \"[mcp_client::stdio]\",\n                command = %self.command,\n                \"stdio MCP command not found on resolved PATH\"\n            );\n            anyhow::bail!(spawn_env::missing_command_error(&self.command));\n        }\n\n        let mut child = command\n            .spawn()\n            .with_context(|| format!(\"spawning MCP stdio server `{}`\", self.command))?;\n        let stdin = child\n            .stdin\n            .take()\n            .ok_or_else(|| anyhow::anyhow!(\"stdio server missing stdin\"))?;\n        let stdout = child\n            .stdout\n            .take()\n            .ok_or_else(|| anyhow::anyhow!(\"stdio server missing stdout\"))?;\n        let mut session = StdioSession {\n            child,\n            stdin,\n            stdout: BufReader::new(stdout),\n            initialize: McpInitializeResult {","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/config_servers/stdio.rs#L83-L119","documentation":"The generic arm of the same pre-spawn guard: `locate_command` could not find the configured stdio command (any basename that is not npx/npm/node/uvx/uv) on the resolved PATH — config `env` PATH override if present, else OpenHuman's spawn PATH, searched relative to the server's `cwd` when set. The server process is never spawned; a `[mcp_client::stdio]` warn log records the command name.","triggerScenarios":"stdio server entries whose `command` is a custom binary, `docker`, `python`, `deno`, `bun`, etc., where the binary is absent, not executable, or only on the interactive shell's PATH.","commonSituations":"Dockerized/container deployments missing a runtime the config assumes; GUI launch losing shell PATH additions; script or binary installed after OpenHuman started (env is snapshotted at launch — the message explicitly says restart); command typo.","solutions":["Install the missing binary/runtime and restart OpenHuman so the new PATH is picked up.","Set an explicit `env = { PATH = \"...\" }` on the server entry pointing at the binary's directory.","Use an absolute `command` path (checked against cwd if set).","Confirm the binary is executable and not a shell alias/function, which `locate_command` cannot see."],"exampleFix":"# before\n[[mcp_client.servers.custom]]\ncommand = \"my-mcp-bridge\"\n\n# after\n[[mcp_client.servers.custom]]\ncommand = \"/usr/local/bin/my-mcp-bridge\"","handlingStrategy":"validation","validationCode":"let path = std::env::var(\"PATH\").unwrap_or_default();\nif spawn_env::locate_command(&server.command, &path, server.cwd.as_deref()).is_none() {\n    // fail config validation early with the command name\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer absolute paths for custom stdio commands.","Shell aliases/functions are invisible to locate_command — symlink real binaries into PATH instead.","Validate that every configured command resolves at startup, not at first call."],"tags":["mcp","stdio","path","command-not-found","environment"],"backgroundTag":"command-not-found","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}