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.
When Cosine plans
Section titled “When Cosine plans”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.
How planning works
Section titled “How planning works”- Explore — The agent reads relevant files and asks clarifying questions
- Draft — The agent writes a step-by-step implementation plan
- Present — The plan is shown to you for review and approval
- Proceed — You choose how to continue: approve and execute, revise, or reject
Plan approval options
Section titled “Plan approval options”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.
| Option | What it does |
|---|---|
| Yes, clear context and auto-accept edits | Clears 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 edits | Keeps the full conversation and switches to Auto mode |
| Yes, manually approve edits | Keeps the conversation and switches to Manual mode so you approve each change |
| Yes, accept and enable Swarm mode | Hands the plan to a swarm of subagents for parallel execution |
| Type feedback | Provide feedback on the plan so the agent can revise it |
| Reject, and exit plan mode | Exits review and returns to the previous mode; the latest task plan remains available |
Investigation during planning
Section titled “Investigation during planning”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.
Autonomous planning in Swarm
Section titled “Autonomous planning in Swarm”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.
Why plan first?
Section titled “Why plan first?”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
Related pages
Section titled “Related pages”- Agents, modes and swarm — Mode behaviour including Plan mode
- CLI Modes — Switching modes in the terminal