tinyhumansai/openhuman · error

workspace_init: {e}

Error message

workspace_init: {e}

What it means

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.

Source

Thrown at src/openhuman/config/workspace/tools.rs:175

        "Scaffold the workspace (memory/sessions/state dirs, bundled prompts, \
         HEARTBEAT.md). `force` re-initializes existing files. Default-OFF \
         (opt-in)."
    }
    fn parameters_schema(&self) -> serde_json::Value {
        json!({
            "type": "object",
            "properties": { "force": { "type": "boolean", "description": "Re-initialize existing files (default false)." } }
        })
    }
    fn permission_level(&self) -> PermissionLevel {
        PermissionLevel::Write
    }
    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][workspace] init invoked");
        let force = args.get("force").and_then(Value::as_bool).unwrap_or(false);
        let value = ops::init_workspace(force)
            .await
            .map_err(|e| anyhow::anyhow!("workspace_init: {e}"))?;
        Ok(ToolResult::success(serde_json::to_string(&value)?))
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::openhuman::tools::traits::ToolScope;

    fn cfg() -> Arc<Config> {
        Arc::new(Config::default())
    }

    #[test]
    fn names_and_levels() {
        assert_eq!(
            WorkspaceReadPersonaTool::new(cfg()).name(),
            "workspace_read_persona"

View on GitHub (pinned to 7491200858)

Solutions

  1. Check write permission on the workspace root
  2. Clear conflicting non-directory entries and retry
  3. Inspect the wrapped error for which path failed
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/config/workspace/tools.rs:175 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/4f3d3e707330bab8. Report an issue: GitHub.