Skip to main content
Starting a Task

Plan First, Then Execute (Plan)

Overview

Plan allows Qoder to explore the codebase in read-only mode, analyze problems, and propose a solution before making any code changes. Once you approve the plan, you can exit Plan mode to proceed with the actual modifications. It is ideal for tasks with a broad impact, those involving multiple files, or situations where you want to review the overall approach before any changes are made. Plan is an independent working state, not a permission policy—it can coexist with any permission mode. When in Plan mode, Qoder's write access is restricted, and its primary output is a proposed plan.

Entering and Exiting

Use the /plan command to toggle Plan mode on or off:
/plan
  • Once enabled, Qoder will explore the code in read-only mode and output a plan without directly modifying your code.
  • Run /plan again to exit.
You can also enter the Plan working state at startup:
qodercli --permission-mode plan
--permission-mode plan is retained for backward compatibility. Since Plan is a working state rather than a permission mode, this value is mapped to "default permission mode + enter Plan state".

How It Works

In Plan mode:
  • Qoder reads relevant files, searches the codebase, and analyzes the current state to understand what needs to be done and how.
  • Its write access is restricted, focusing its output on a plan for your review.
  • You can provide feedback on the plan and have Qoder adjust it until it meets your expectations.
This "look before you leap" approach reduces rework on complex tasks by ensuring the direction is correct before Qoder executes the changes.

Executing with Goal

Plan is often used in conjunction with Goal: first, confirm the approach in Plan mode, then exit Plan and use /goal set to enter Goal mode, allowing Qoder to autonomously execute the approved plan to completion. This ensures the correct direction while letting Qoder handle the subsequent implementation. For detailed information on Goal, see Continuously Achieving Goals (Goal). If Plan is active before Goal execution, Qoder will restore the Plan state along with the goal when resuming across processes.

When to Use

  • High-impact changes: Modifications spanning multiple files or involving public interfaces and core logic.
  • Uncertain direction: Scenarios with multiple implementation options that require comparison before deciding.
  • Desire for prior review: When you want to see Qoder's intended approach before any changes are made.
For simple, well-defined minor changes, it is usually faster to let Qoder work directly in interactive mode without entering Plan.