{"record":{"id":"4e4bb48d69cf7388","repo":"tinyhumansai/openhuman","slug":"missing-new-string-parameter","errorCode":null,"errorMessage":"Missing 'new_string' parameter","messagePattern":"Missing 'new_string' parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/filesystem/edit_file.rs","lineNumber":99,"sourceCode":"\nimpl EditFileTool {\n    async fn execute_in_context(\n        &self,\n        args: serde_json::Value,\n        context: Option<&ToolExecutionContext>,\n    ) -> anyhow::Result<ToolResult> {\n        let path = args\n            .get(\"path\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'path' parameter\"))?;\n        let old_string = args\n            .get(\"old_string\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'old_string' parameter\"))?;\n        let new_string = args\n            .get(\"new_string\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'new_string' parameter\"))?;\n        let replace_all = args\n            .get(\"replace_all\")\n            .and_then(|v| v.as_bool())\n            .unwrap_or(false);\n\n        if old_string.is_empty() {\n            return Ok(ToolResult::error(\"`old_string` must not be empty\"));\n        }\n        if old_string == new_string {\n            return Ok(ToolResult::error(\n                \"`old_string` and `new_string` are identical — nothing to do\",\n            ));\n        }\n\n        if !self.security.can_act() {\n            return Ok(ToolResult::error(\n                \"[policy-blocked] Action blocked: autonomy is read-only\",\n            ));","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/filesystem/edit_file.rs#L81-L117","documentation":"Edit-file tool argument guard: 'path' and 'old_string' parsed, but 'new_string' is absent or not a string. The replacement half of the edit is missing; no file is touched.","triggerScenarios":"Thrown at src/openhuman/tools/impl/filesystem/edit_file.rs:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide 'new_string' as a string (empty string is valid for a deletion)","Include all three of path, old_string, new_string"],"exampleFix":null,"handlingStrategy":"validation","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"}