Skip to content

Plan & Build Modes

OpenCode has two modes: Plan (Tab) disables edits and only suggests approaches. Build (Tab again) makes real changes. This separation prevents the agent from going off-script before you review its plan.

Gnome mascot

What you'll learn

  • Plan mode: agent analyzes and suggests but cannot edit files
  • Build mode: agent makes actual changes to your codebase
  • Switch freely between modes with the Tab key

Build it

Start by entering Plan mode to outline the desired features without modifying files. After reviewing the suggested plan, switch to Build mode to execute the changes.

bash
# In the TUI, press Tab to enter Plan mode
# Describe the feature you want
# Review the plan the agent produces
# Press Tab again to switch to Build mode
# Tell the agent to execute the plan

What goes wrong

MistakeHow you notice itThe fix
Agent makes changes in Plan modeFiles modified unexpectedlyVerify the mode indicator in the lower right corner. Plan mode should prevent all writes
Plan is too vague to executeBuild mode produces wrong resultsGive feedback in Plan mode before switching. Add details, ask for specifics

Next: AGENTS.md & Context