tinyhumansai/openhuman · error · anyhow::Error
git {} failed: {}
Error message
git {} failed: {} What it means
workspace_state's hardened git invocation ran but exited non-zero; the message wraps the failing subcommand and git's stderr so the operator can see which repository operation (status/log/diff) failed and why.
Source
Thrown at src/openhuman/tools/impl/system/workspace_state.rs:344
"[workspace_state] refusing to run git: dir={}, disallowed_config_key={key}",
dir.display()
);
anyhow::bail!(
"refusing to run git in {}: its repository config sets `{key}`, which is \
not on the allowlist of configuration this tool will run under. \
Several git config keys name a command git then executes, and this \
directory is agent-writable, so unrecognised configuration is treated \
as untrusted rather than honoured.",
dir.display()
)
}
let output = hardened_git(dir).args(args).output().await?;
if output.status.success() {
Ok(String::from_utf8_lossy(&output.stdout).to_string())
} else {
anyhow::bail!(
"git {} failed: {}",
args.join(" "),
String::from_utf8_lossy(&output.stderr)
)
}
}
#[cfg(test)]
mod tests {
use super::*;
use serde_json::json;
use tempfile::TempDir;
fn make_tool(dir: &TempDir) -> WorkspaceStateTool {
WorkspaceStateTool::new(dir.path().to_path_buf())
}
#[test]View on GitHub (pinned to 7491200858)
Solutions
- Read the stderr text in the error to identify the failure
- If the repo is mid-rebase or otherwise dirty-state, resolve that state and retry
- Verify the directory is a valid git repository and readable by the process
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/tools/impl/system/workspace_state.rs:344 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/9d10ba9e49cc1392.
Report an issue: GitHub.