{"record":{"id":"074b9d639c60c4a9","repo":"FoundationAgents/OpenManus","slug":"parameter-insert-line-is-required-for-command-i","errorCode":null,"errorMessage":"Parameter `insert_line` is required for command: insert","messagePattern":"Parameter `insert_line` is required for command: insert","errorType":"exception","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"app/tool/str_replace_editor.py","lineNumber":150,"sourceCode":"\n        # Execute the appropriate command\n        if command == \"view\":\n            result = await self.view(path, view_range, operator)\n        elif command == \"create\":\n            if file_text is None:\n                raise ToolError(\"Parameter `file_text` is required for command: create\")\n            await operator.write_file(path, file_text)\n            self._file_history[path].append(file_text)\n            result = ToolResult(output=f\"File created successfully at: {path}\")\n        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:","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/FoundationAgents/OpenManus/blob/52a13f2a57d8c7f6737eefb02ccf569594d44273/app/tool/str_replace_editor.py#L132-L168","documentation":"Error \"Parameter `insert_line` is required for command: insert\" thrown in FoundationAgents/OpenManus.","triggerScenarios":"Raised when the `insert` command is called without the required `insert_line` parameter.","commonSituations":"See trigger scenarios.","solutions":["Pass the `insert_line` parameter (integer line number after which to insert) when using command `insert`."],"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"}