tinyhumansai/openhuman · error · anyhow::Error
edit[{i}]: missing `path`
Error message
edit[{i}]: missing `path` What it means
Guard while parsing apply_patch edits: the i-th edit object has no string `path` field, so the target file cannot be determined. Edits are parsed and grouped by file in a loop; this names the exact failing index.
Source
Thrown at src/openhuman/tools/impl/filesystem/apply_patch.rs:136
return Ok(ToolResult::error(
"Rate limit exceeded: too many actions in the last hour",
));
}
if !self.security.record_action() {
return Ok(ToolResult::error(
"Rate limit exceeded: action budget exhausted",
));
}
let path_policy = super::security_for_tool_context(&self.security, context, "apply_patch");
// Parse + group edits by file.
let mut parsed: Vec<ParsedEdit> = Vec::with_capacity(edits.len());
for (i, raw) in edits.iter().enumerate() {
let path = raw
.get("path")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow::anyhow!("edit[{i}]: missing `path`"))?;
let old_string = raw
.get("old_string")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow::anyhow!("edit[{i}]: missing `old_string`"))?;
let new_string = raw
.get("new_string")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow::anyhow!("edit[{i}]: missing `new_string`"))?;
let replace_all = raw
.get("replace_all")
.and_then(|v| v.as_bool())
.unwrap_or(false);
if old_string.is_empty() {
return Ok(ToolResult::error(format!(
"edit[{i}]: `old_string` must not be empty"
)));
}View on GitHub (pinned to 7491200858)
Solutions
- Add a string `path` to edit[{i}]
- Use a workspace-relative or absolute path consistent with the path policy
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/tools/impl/filesystem/apply_patch.rs:136 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/1d7cd5fbbd557aed.
Report an issue: GitHub.