FoundationAgents/OpenManus · warning · ToolError
No active plan. Please specify a plan_id or set an active pl
Error message
No active plan. Please specify a plan_id or set an active plan.
What it means
Raised by _get_plan (app/tool/planning.py:233) when command='get' is called without plan_id and no plan has ever been set active (self._current_plan_id is None). The active plan is set implicitly by create (which sets _current_plan_id) or explicitly by set_active; a fresh process, or one where all plans were deleted, has none.
Source
Thrown at app/tool/planning.py:233
output = "Available plans:\n"
for plan_id, plan in self.plans.items():
current_marker = " (active)" if plan_id == self._current_plan_id else ""
completed = sum(
1 for status in plan["step_statuses"] if status == "completed"
)
total = len(plan["steps"])
progress = f"{completed}/{total} steps completed"
output += f"• {plan_id}{current_marker}: {plan['title']} - {progress}\n"
return ToolResult(output=output)
def _get_plan(self, plan_id: Optional[str]) -> ToolResult:
"""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}")
View on GitHub (pinned to 52a13f2a57)
Solutions
- Create a plan first (create auto-sets it active) or call set_active with an existing plan_id.
- Pass plan_id explicitly to get when you know which plan you want — it bypasses the active-plan requirement entirely.
- Call command='list' to see available plans and pick one before get.
Example fix
// before result = await planning.execute(command='get') # nothing active yet // after result = await planning.execute(command='list') # discover plans result = await planning.execute(command='get', plan_id='p1') # explicit target
Defensive patterns
Strategy: validation
Validate before calling
if not plan_id and not has_active_plan():
listing = await planning.execute(command='list')
if no_plans(listing):
await planning.execute(command='create', plan_id=pid, title=t, steps=s) # auto-activates
result = await planning.execute(command='get', plan_id=plan_id) Try / catch
try:
result = await planning.execute(command='get')
except ToolError as e:
if 'No active plan' in str(e):
result = await planning.execute(command='list')
# pick a plan, set_active, then retry get
else:
raise Prevention
- Always pass plan_id to get when the ID is known — it never depends on active-plan state.
- Ensure create/set_active succeeds before bare get calls in a session bootstrap.
When it happens
Trigger: Calling `planning.execute(command='get')` in a brand-new session before any create/set_active; after deleting the active plan (delete does not necessarily clear/replace the pointer, but a fresh store has none); multi-worker deployments where the active plan lives in another process's memory.
Common situations: Agent boot sequences that query the current plan before creating one; resumed sessions after restart (class-level state lost); calling get right after a failed create that raised before setting _current_plan_id.
Related errors
- No primary agent available
- Unrecognized command: {command}. Allowed commands are: creat
- Parameter `plan_id` is required for command: create
- A plan with ID '{plan_id}' already exists. Use 'update' to m
- Parameter `title` is required for command: create
AI-assisted analysis of FoundationAgents/OpenManus@52a13f2a57 (2026-08-15).
Data as JSON: /api/errors/33fa7e58e994e20b.
Report an issue: GitHub.