{"record":{"id":"614ebc372bf7b620","repo":"tinyhumansai/openhuman","slug":"missing-required-field-op","errorCode":null,"errorMessage":"missing required field `op`","messagePattern":"missing required field `op`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/tools/todo.rs","lineNumber":121,"sourceCode":"                \"cards\": {\n                    \"type\": \"array\",\n                    \"description\": \"Full card list for op=replace.\",\n                    \"items\": { \"type\": \"object\" }\n                }\n            },\n            \"required\": [\"op\"]\n        })\n    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::None\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let op = args\n            .get(\"op\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"missing required field `op`\"))?\n            .trim()\n            .to_string();\n\n        let location = current_location();\n        tracing::debug!(op = %op, thread_id = ?location.thread_id(), \"[tool][todo] dispatch\");\n\n        let result = match op.as_str() {\n            \"add\" => {\n                let content = required_string(&args, \"content\")?;\n                let mut patch = patch_from_args(&args)?;\n                if patch.approval_mode.is_none() {\n                    patch.approval_mode = Some(default_task_approval_mode().await);\n                }\n                ops::add(&location, &content, patch).await\n            }\n            \"edit\" => {\n                let id = required_string(&args, \"id\")?;\n                let mut patch = patch_from_args(&args)?;","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/tools/todo.rs#L103-L139","documentation":"The todo tool was invoked without the `op` field (absent or not a string). `op` selects which board operation runs (add/edit/update_status/remove/replace) and is the only required schema key; the guard fires before the operation match, so the call is rejected before any board state is touched.","triggerScenarios":"Thrown at src/openhuman/agent/tools/todo.rs:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include `op` with one of the supported operation names (e.g. \"add\", \"edit\", \"update_status\", \"remove\", \"replace\")"],"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-23T08:17:48.524Z"}