FoundationAgents/OpenManus · warning · ToolError
Parameter `plan_id` is required for command: set_active
Error message
Parameter `plan_id` is required for command: set_active
What it means
Raised by _set_active_plan (app/tool/planning.py:247) when command='set_active' is dispatched without a truthy plan_id. Unlike get/mark_step, set_active has no default target — it exists precisely to name a plan, so omitting the ID is always a caller error. Nothing is mutated when it fires.
Source
Thrown at app/tool/planning.py:247
"""Get details of a specific plan."""
if not plan_id:
# If no plan_id is provided, use the current active plan
if not self._current_plan_id:
raise ToolError(
"No active plan. Please specify a plan_id or set an active plan."
)
plan_id = self._current_plan_id
if plan_id not in self.plans:
raise ToolError(f"No plan found with ID: {plan_id}")
plan = self.plans[plan_id]
return ToolResult(output=self._format_plan(plan))
def _set_active_plan(self, plan_id: Optional[str]) -> ToolResult:
"""Set a plan as the active plan."""
if not plan_id:
raise ToolError("Parameter `plan_id` is required for command: set_active")
if plan_id not in self.plans:
raise ToolError(f"No plan found with ID: {plan_id}")
self._current_plan_id = plan_id
return ToolResult(
output=f"Plan '{plan_id}' is now the active plan.\n\n{self._format_plan(self.plans[plan_id])}"
)
def _mark_step(
self,
plan_id: Optional[str],
step_index: Optional[int],
step_status: Optional[str],
step_notes: Optional[str],
) -> ToolResult:
"""Mark a step with a specific status and optional notes."""
if not plan_id:View on GitHub (pinned to 52a13f2a57)
Solutions
- Pass the plan_id: `planning.execute(command='set_active', plan_id='p1')`.
- Resolve a default in the caller first (e.g. from list output or your own tracked last-created id) before invoking.
- Guard in wrappers: skip the call entirely when plan_id is falsy rather than letting the tool reject it.
Example fix
// before await planning.execute(command='set_active') // after await planning.execute(command='set_active', plan_id='p1')
Defensive patterns
Strategy: validation
Validate before calling
if not plan_id:
raise ValueError('set_active requires plan_id')
await planning.execute(command='set_active', plan_id=plan_id) Type guard
def is_plan_id(v: str | None) -> bool:
return isinstance(v, str) and bool(v.strip()) Prevention
- Skip the set_active call entirely when plan_id is falsy instead of relying on the tool to reject it.
- set_active has no active-plan fallback — always resolve a concrete ID first.
When it happens
Trigger: Calling `planning.execute(command='set_active')` with plan_id omitted/empty; programmatic calls that forward an optional variable which was never populated.
Common situations: Models treating set_active as 'activate the most recent plan'; wrapper code paths where plan_id is conditionally set and the None branch is not excluded.
Related errors
- Parameter `plan_id` is required for command: create
- Parameter `title` is required for command: create
- Parameter `plan_id` is required for command: update
- No primary agent available
- Unrecognized command: {command}. Allowed commands are: creat
AI-assisted analysis of FoundationAgents/OpenManus@52a13f2a57 (2026-08-15).
Data as JSON: /api/errors/e8e4f6e49b8d0008.
Report an issue: GitHub.