{"record":{"id":"f0d41e8adfe18467","repo":"tinyhumansai/openhuman","slug":"failed-to-build-tokio-runtime-e","errorCode":null,"errorMessage":"failed to build tokio runtime: {e}","messagePattern":"failed to build tokio runtime: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tree/tree_runtime/cli.rs","lineNumber":340,"sourceCode":"\n        println!(\n            \"{}\",\n            serde_json::to_string_pretty(&outcome.value)\n                .unwrap_or_else(|_| format!(\"{:?}\", outcome.value))\n        );\n        Ok(())\n    })\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfn build_runtime() -> Result<tokio::runtime::Runtime> {\n    tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()\n        .map_err(|e| anyhow::anyhow!(\"failed to build tokio runtime: {e}\"))\n}\n\nasync fn load_config() -> Result<crate::openhuman::config::Config> {\n    let mut config = crate::openhuman::config::Config::load_or_init()\n        .await\n        .unwrap_or_default();\n    config.apply_env_overrides();\n    Ok(config)\n}\n\nfn init_logging(verbose: bool) {\n    if !verbose && std::env::var_os(\"RUST_LOG\").is_none() {\n        unsafe { std::env::set_var(\"RUST_LOG\", \"warn\") };\n    }\n    crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);\n}\n\nfn is_help(value: &str) -> bool {","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tree/tree_runtime/cli.rs#L322-L358","documentation":"The `build_runtime` helper in the tree-summarizer CLI failed to construct a multi-thread tokio runtime via `Builder::new_multi_thread().enable_all().build()`. This is an infrastructure-level failure that fires when the OS refuses to spawn worker threads (thread/resource limits hit, e.g. `ulimit` or a container with a low pids cap) or the runtime's internal machinery cannot initialize. It is not caused by user input.","triggerScenarios":"Thrown at src/openhuman/memory/tree/tree_runtime/cli.rs:340 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check thread/resource limits: `ulimit -u` and, in containers, the pids cgroup limit","Free system resources or reduce concurrent workloads, then retry the command","As a diagnostic, try the same command on a less constrained host to isolate the environment"],"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-14T05:17:10.506Z"}