{"record":{"id":"11a4c57fca372321","repo":"FoundationAgents/OpenManus","slug":"unrecognized-command-command-the-allowed-comman","errorCode":null,"errorMessage":"Unrecognized command {command}. The allowed commands for the {self.name} tool are: {\", \".join(get_args(Command))}","messagePattern":"Unrecognized command (.+?)\\. The allowed commands for the (.+?) tool are: (.+?)","errorType":"exception","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"app/tool/str_replace_editor.py","lineNumber":160,"sourceCode":"        elif command == \"str_replace\":\n            if old_str is None:\n                raise ToolError(\n                    \"Parameter `old_str` is required for command: str_replace\"\n                )\n            result = await self.str_replace(path, old_str, new_str, operator)\n        elif command == \"insert\":\n            if insert_line is None:\n                raise ToolError(\n                    \"Parameter `insert_line` is required for command: insert\"\n                )\n            if new_str is None:\n                raise ToolError(\"Parameter `new_str` is required for command: insert\")\n            result = await self.insert(path, insert_line, new_str, operator)\n        elif command == \"undo_edit\":\n            result = await self.undo_edit(path, operator)\n        else:\n            # This should be caught by type checking, but we include it for safety\n            raise ToolError(\n                f'Unrecognized command {command}. The allowed commands for the {self.name} tool are: {\", \".join(get_args(Command))}'\n            )\n\n        return str(result)\n\n    async def validate_path(\n        self, command: str, path: Path, operator: FileOperator\n    ) -> None:\n        \"\"\"Validate path and command combination based on execution environment.\"\"\"\n        # Check if path is absolute\n        if not path.is_absolute():\n            raise ToolError(f\"The path {path} is not an absolute path\")\n\n        # Only check if path exists for non-create commands\n        if command != \"create\":\n            if not await operator.exists(path):\n                raise ToolError(\n                    f\"The path {path} does not exist. Please provide a valid path.\"","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/FoundationAgents/OpenManus/blob/52a13f2a57d8c7f6737eefb02ccf569594d44273/app/tool/str_replace_editor.py#L142-L178","documentation":"Error \"Unrecognized command {command}. The allowed commands for the {self.name} tool are: {\", \".join(get_args(Command))}\" thrown in FoundationAgents/OpenManus.","triggerScenarios":"Raised when str_replace_editor receives a command that is not one of the allowed Command values (view, create, str_replace, insert, undo_edit).","commonSituations":"See trigger scenarios.","solutions":["Use one of the allowed commands listed in the error message (view, create, str_replace, insert, undo_edit).","Check for typos in the `command` parameter; it is case-sensitive."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"52a13f2a57d8c7f6737eefb02ccf569594d44273","analyzedAt":"2026-08-15T02:33:49.993Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}