tinyhumansai/openhuman · error

Working directory '{}' does not exist and could not be creat

Error message

Working directory '{}' does not exist and could not be created: {e}. Set a valid path in Settings → Agent access → Working directory.

What it means

Startup validation of the configured agent working directory (action_dir): the path does not exist, an attempt to create it failed (permissions, invalid path), or it resolves to a non-directory. The message deliberately names the Settings location so the user fixes configuration instead of seeing an opaque OS error 267 from a later spawn.

Source

Thrown at src/openhuman/config/ops/agent.rs:364

        );
    }
    tracing::info!(
        workspace = %redact_home(&config.workspace_dir),
        action = %redact_home(&action_dir),
        "[startup] workspace (internal state) and action sandbox (tool cwd) directories configured"
    );
}

/// Ensure `dir` is usable as a process working directory: it must exist (we
/// attempt to create it if missing — covers a dir deleted after launch) and
/// resolve to a directory. Returns a descriptive error naming the path and the
/// Settings location to fix it, instead of letting the OS surface an opaque
/// `ERROR_DIRECTORY` (os error 267) from `CreateProcessW`. See issue #3353
/// (Fix 2). Cheap stat-only calls on the happy path.
pub fn ensure_usable_cwd(dir: &Path) -> anyhow::Result<()> {
    if !dir.exists() {
        std::fs::create_dir_all(dir).map_err(|e| {
            anyhow::anyhow!(
                "Working directory '{}' does not exist and could not be created: {e}. \
                 Set a valid path in Settings → Agent access → Working directory.",
                dir.display()
            )
        })?;
    }
    if !dir.is_dir() {
        anyhow::bail!(
            "Working directory '{}' is not a directory. \
             Set a valid path in Settings → Agent access → Working directory.",
            dir.display()
        );
    }
    Ok(())
}

fn action_dir_source(config: &Config) -> &'static str {
    if crate::openhuman::config::action_dir_env_override().is_some() {

View on GitHub (pinned to 7491200858)

Solutions

  1. Set a valid, creatable path in Settings → Agent access → Working directory
  2. Grant the app write permission on the parent directory
  3. Remove any file occupying the path
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/config/ops/agent.rs:364 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/613968b699fd9512. Report an issue: GitHub.