{"record":{"id":"cc2e9bce002facdf","repo":"FoundationAgents/OpenManus","slug":"parameter-title-is-required-for-command-create","errorCode":null,"errorMessage":"Parameter `title` is required for command: create","messagePattern":"Parameter `title` is required for command: create","errorType":"exception","errorClass":"ToolError","httpStatus":null,"severity":"warning","filePath":"app/tool/planning.py","lineNumber":133,"sourceCode":"        else:\n            raise ToolError(\n                f\"Unrecognized command: {command}. Allowed commands are: create, update, list, get, set_active, mark_step, delete\"\n            )\n\n    def _create_plan(\n        self, plan_id: Optional[str], title: Optional[str], steps: Optional[List[str]]\n    ) -> ToolResult:\n        \"\"\"Create a new plan with the given ID, title, and steps.\"\"\"\n        if not plan_id:\n            raise ToolError(\"Parameter `plan_id` is required for command: create\")\n\n        if plan_id in self.plans:\n            raise ToolError(\n                f\"A plan with ID '{plan_id}' already exists. Use 'update' to modify existing plans.\"\n            )\n\n        if not title:\n            raise ToolError(\"Parameter `title` is required for command: create\")\n\n        if (\n            not steps\n            or not isinstance(steps, list)\n            or not all(isinstance(step, str) for step in steps)\n        ):\n            raise ToolError(\n                \"Parameter `steps` must be a non-empty list of strings for command: create\"\n            )\n\n        # Create a new plan with initialized step statuses\n        plan = {\n            \"plan_id\": plan_id,\n            \"title\": title,\n            \"steps\": steps,\n            \"step_statuses\": [\"not_started\"] * len(steps),\n            \"step_notes\": [\"\"] * len(steps),\n        }","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/FoundationAgents/OpenManus/blob/52a13f2a57d8c7f6737eefb02ccf569594d44273/app/tool/planning.py#L115-L151","documentation":"Raised by _create_plan (app/tool/planning.py:133) when command='create' is dispatched with plan_id present but title empty/None. Title is stored on the plan and rendered in listings (_list_plans shows it), so the tool rejects untitled plans. Validation order: plan_id first, uniqueness second, then title, then steps.","triggerScenarios":"Calling `planning.execute(command='create', plan_id='p1', steps=['a'])` without title, or with title='' (empty string is falsy and rejected).","commonSituations":"Models that see title as optional because the JSON schema only marks 'command' required; callers passing None as a default; whitespace-only titles are accepted, so empty-string checks at the caller should strip first if you want stricter behavior.","solutions":["Supply a non-empty title: `planning.execute(command='create', plan_id='p1', title='Ship v2', steps=[...])`.","In the calling layer, derive a title when missing (e.g. from the first step or a default like 'Untitled plan') before invoking create.","Validate in your wrapper: reject call if not (plan_id and plan_id not in used and title and steps)."],"exampleFix":"// before\nawait planning.execute(command='create', plan_id='p1', steps=['a'])\n\n// after\nawait planning.execute(command='create', plan_id='p1', title='Setup tasks', steps=['a'])","handlingStrategy":"validation","validationCode":"title = (title or '').strip() or 'Untitled plan'\nawait planning.execute(command='create', plan_id=plan_id, title=title, steps=steps)","typeGuard":"def is_non_empty_title(t: str | None) -> bool:\n    return isinstance(t, str) and bool(t.strip())","tryCatchPattern":null,"preventionTips":["Default the title in your wrapper (from the first step text) before calling create.","Strip whitespace so '  ' titles fail fast at your layer with a better message."],"tags":["planning","validation","required-field"],"backgroundTag":null,"analyzedSha":"52a13f2a57d8c7f6737eefb02ccf569594d44273","analyzedAt":"2026-08-15T02:33:49.993Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}