{"record":{"id":"4f3d3e707330bab8","repo":"tinyhumansai/openhuman","slug":"workspace-init-e","errorCode":null,"errorMessage":"workspace_init: {e}","messagePattern":"workspace_init: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/config/workspace/tools.rs","lineNumber":175,"sourceCode":"        \"Scaffold the workspace (memory/sessions/state dirs, bundled prompts, \\\n         HEARTBEAT.md). `force` re-initializes existing files. Default-OFF \\\n         (opt-in).\"\n    }\n    fn parameters_schema(&self) -> serde_json::Value {\n        json!({\n            \"type\": \"object\",\n            \"properties\": { \"force\": { \"type\": \"boolean\", \"description\": \"Re-initialize existing files (default false).\" } }\n        })\n    }\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Write\n    }\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][workspace] init invoked\");\n        let force = args.get(\"force\").and_then(Value::as_bool).unwrap_or(false);\n        let value = ops::init_workspace(force)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"workspace_init: {e}\"))?;\n        Ok(ToolResult::success(serde_json::to_string(&value)?))\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use crate::openhuman::tools::traits::ToolScope;\n\n    fn cfg() -> Arc<Config> {\n        Arc::new(Config::default())\n    }\n\n    #[test]\n    fn names_and_levels() {\n        assert_eq!(\n            WorkspaceReadPersonaTool::new(cfg()).name(),\n            \"workspace_read_persona\"","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/config/workspace/tools.rs#L157-L193","documentation":"Scaffolding the workspace (dirs, bundled prompts, HEARTBEAT.md) failed at the ops layer; wrapped with the tool name. The optional `force` flag needs no validation, so this is an IO failure creating or replacing workspace files.","triggerScenarios":"Thrown at src/openhuman/config/workspace/tools.rs:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check write permission on the workspace root","Clear conflicting non-directory entries and retry","Inspect the wrapped error for which path failed"],"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"}