Skip to content

Planning

Cosine can investigate before it acts. When a task is large, ambiguous, or risky, the agent may suggest entering Plan mode so it can produce a structured plan before making any changes. If you know you want a plan before starting a task, you can request one by operating the agent in Plan mode.

Cosine can plan when:

  • You explicitly switch to Plan mode before sending a prompt
  • You ask Cosine to plan before implementing
  • The task spans many files or modules
  • The request is ambiguous and needs clarification
  • The agent detects that planning would reduce risk or rework

Auto and Swarm can enter planning within the current task. Cosine asks before a suggested transition unless automatic plan approval is enabled. If you explicitly ask Cosine to plan, it can start planning directly. Manual mode does not let the agent switch itself into planning.

  1. Explore — The agent reads relevant files and asks clarifying questions
  2. Draft — The agent writes a step-by-step implementation plan
  3. Present — The plan is shown to you for review and approval
  4. Proceed — You choose how to continue: approve and execute, revise, or reject

When you explicitly select Plan mode, Cosine asks how to proceed before implementation starts. These options control whether Cosine implements automatically, asks for manual approval, revises the plan, or exits Plan mode.

OptionWhat it does
Yes, clear context and auto-accept editsClears the conversation history, keeps the plan, and switches to Auto mode for implementation. This can free up space in the context and works best if the plan is self-contained
Yes, auto-accept editsKeeps the full conversation and switches to Auto mode
Yes, manually approve editsKeeps the conversation and switches to Manual mode so you approve each change
Yes, accept and enable Swarm modeHands the plan to a swarm of subagents for parallel execution
Type feedbackProvide feedback on the plan so the agent can revise it
Reject, and exit plan modeExits review and returns to the previous mode; the latest task plan remains available

During planning and review, Cosine can read files, search, query supported language servers and update the plan. It cannot edit source, run general shell commands, use browser actions or call MCP tools without an allowed planning classification. These restrictions still apply with tool auto-accept enabled. Tests that need shell commands wait until you approve implementation.

These restrictions apply to the planning agent. Previously authorised Swarm workers can continue while the coordinator replans. Your own terminal remains available.

Use /auto-approve-plan to toggle automatic plan approval for the current CLI session. Selecting Swarm alone does not enable it. When enabled, Swarm can prepare and approve a plan, then continue your task. It still needs permission for actions outside the scope you authorised.

Automatic approval keeps the planning conversation. You can still explicitly choose the clear-context approval option when you want to start implementation with a smaller context. Selecting Plan mode yourself always requests review; plan-only tasks finish with a plan without starting implementation.

During replanning, existing workers can continue while new assignments wait. Swarm checks their work against the revised plan and stops affected workers before assigning replacements.

Planning is useful when:

  • The task is large or ambiguous and you want to align on approach before writing code
  • You want a written record of the intended changes before they happen
  • You’re exploring trade-offs between different implementation strategies
  • You want to review scope before committing time and tokens