{"record":{"id":"865d559198f50246","repo":"tinyhumansai/openhuman","slug":"stdio-server-missing-stdin","errorCode":null,"errorMessage":"stdio server missing stdin","messagePattern":"stdio server missing stdin","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/config_servers/stdio.rs","lineNumber":110,"sourceCode":"            .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 {\n                protocol_version: LATEST_PROTOCOL_VERSION.into(),\n                capabilities: json!({}),\n                server_info: json!({}),\n                instructions: None,\n            },\n        };\n\n        let response = self\n            .send_request_on_session(","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/config_servers/stdio.rs#L92-L128","documentation":"After successfully spawning the stdio MCP child process, child.stdin was None — the command was built without piped stdin, so the host cannot write JSON-RPC frames to the server. The child exists but is unusable as a stdio transport.","triggerScenarios":"Thrown at src/openhuman/mcp/config_servers/stdio.rs:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the StdioCommand is created with stdin piped (Stdio::piped) before spawn","Check that no wrapper script or shell redirection closes or consumes the child's stdin","Kill and re-spawn the child with a correctly configured pipeline"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}