Skip to main content
Starting a task

Plan Before Executing

Overview

Plan lets Qoder explore the code read-only, analyze the problem, and produce a plan before touching any code. Once you confirm the plan, exit Plan and start the actual changes. It is a good fit for tasks with a large blast radius, spanning multiple files, or where you want to see the overall approach before changing anything. Plan is a standalone working state, not a permission policy — it can coexist with any permission mode. While in Plan, Qoder's writes are restricted, and its primary output is a plan.

Entering and exiting

Use the /plan command to enter or exit Plan (it toggles):
/plan
  • After entering, Qoder explores the code read-only and outputs a plan without directly modifying your code.
  • Run /plan again to exit.
You can also enter the Plan working state at startup:
qodercn --permission-mode plan
--permission-mode plan is kept for backward compatibility. Since Plan is a working state rather than a permission mode, this value maps to "default permission mode + entering the Plan state."

How it works

In the Plan state:
  • Qoder reads relevant files, searches the code, and analyzes the current state to figure out what to do and how.
  • Its writes are restricted, and the output centers on a plan you can review.
  • You can give feedback on the plan and have Qoder adjust it until it matches your expectations.
This "see clearly first, then act" approach reduces rework on complex tasks — set the direction right first, then let Qoder execute.

Pairing with Goal

Plan is often paired with Goal: confirm the approach in Plan first, then exit Plan and use /goal <goal> to enter Goal, letting Qoder execute the agreed plan autonomously to completion. This ensures the direction is right while freeing Qoder to finish the implementation work. For details on Goal, see Working Toward a Goal. If Plan was active before Goal execution, Qoder restores the Plan state along with the goal when resuming across processes.

When to use

  • High-impact changes: modifications spanning multiple files, public interfaces, or core logic.
  • Uncertain direction: multiple implementation options exist and need comparing before deciding.
  • Review first: you want to see how Qoder intends to proceed before any changes.
For simple, well-defined small changes, letting Qoder act directly in interactive mode is usually faster — no need to enter Plan.