{"record":{"id":"d8e07051a52ba85f","repo":"tinyhumansai/openhuman","slug":"failed-to-spawn-claude-binary-binary-source","errorCode":null,"errorMessage":"failed to spawn claude binary '{binary}': {source}","messagePattern":"failed to spawn claude binary '(.+?)': (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs","lineNumber":57,"sourceCode":"        \"-p\".to_string(),\n        \"--model\".to_string(),\n        model.to_string(),\n        \"--output-format\".to_string(),\n        \"stream-json\".to_string(),\n        \"--no-color\".to_string(),\n    ];\n    if let Some(budget) = max_budget_usd {\n        args.push(\"--max-turns\".to_string());\n        args.push(\"10\".to_string());\n        args.push(\"--budget\".to_string());\n        args.push(format!(\"{budget:.4}\"));\n    }\n    ClaudeInvocation { args, stdin }\n}\n\nfn spawn_error(binary: &str, source: std::io::Error) -> anyhow::Error {\n    let message = format!(\"failed to spawn claude binary '{binary}': {source}\");\n    anyhow::Error::new(source).context(message)\n}\n\nimpl ClaudeAgentSdkProvider {\n    pub fn new(config: ClaudeAgentSdkConfig) -> Self {\n        let model = config.default_model.clone();\n        Self::for_model(config, model)\n    }\n\n    pub fn for_model(config: ClaudeAgentSdkConfig, model: impl Into<String>) -> Self {\n        Self {\n            config,\n            profile: ModelProfile {\n                provider: Some(\"claude-agent-sdk\".to_string()),\n                model: Some(model.into()),\n                ..Default::default()\n            },\n        }\n    }","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs#L39-L75","documentation":"The Claude Agent SDK subprocess wrapper failed to spawn the claude CLI binary at the configured path — the OS-level exec failed (ENOENT if the binary is not installed/not on PATH, EACCES on permissions, etc.). The {source} is the underlying std::io::Error from the spawn call. This fires before any protocol exchange, so no inference request was made; the provider is simply unusable in this environment.","triggerScenarios":"Thrown at src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the claude binary is installed and the configured path resolves (which claude)","Install the Claude Agent SDK CLI or fix the binary path in provider configuration","Ensure the binary is executable by the user running the core (chmod +x)"],"exampleFix":null,"handlingStrategy":"try-catch","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"}