Skip to main content

Overview

UsePlanningSubagent exposes planning as a tool (plan_with_subagent) that the parent agent can call before implementation. The parent generates a task specification, the planner subagent can use an isolated tool set, and it returns a dense markdown plan back to the parent for execution. This pattern provides:
  • Planner isolation: planning runs in a separate subagent context
  • Tool scoping: planner tools can differ from the parent tool set
  • No recursion: planner toolset automatically removes spawn_subagent and plan_with_subagent
  • Prompt-level guidance: capability appends instructions describing required specification sections
Key concepts:
  • UsePlanningSubagent: installs plan_with_subagent and planning instructions
  • parentInstructions: system prompt fragment telling the parent when/how to call planner
  • parent tool constraints: listed in system prompt so plans stay executable
  • plannerSystemPrompt: specialist prompt for the planning subagent
  • plannerTools: optional allowlist of tools available to planner subagent
  • plannerAdditionalTools: planner-only tools not available to parent execution
  • plannerBudget: optional guard budget for the planner execution

Example