BUILD / use-plan-mode-in-grok-build

Build

Use Plan Mode before Grok Build edits your repo

Use Plan Mode before Grok Build edits your repo

Plan Mode has Grok explore the repo and write a plan you can approve, comment on, or send back. File edits stay off until you press approve.

Open it

  1. Install the CLI if you have not (curl -fsSL https://x.ai/cli/install.sh | bash), then cd into the repo and run grok.
  2. Type /plan and send the job. /plan rewrite the auth middleware enters Plan Mode and starts that turn.
  3. Or press Shift+Tab once from Normal. Status reads plan while it is working.

Grok can flip into Plan Mode on its own when the job looks ambiguous. That is a mode change, not a permission prompt. Leave with Shift+Tab while idle, or q on the approval screen.

Review the plan

The TUI opens a plan preview when planning finishes. Auto and always-approve do not skip this screen. /view-plan (also /show-plan, /plan-view) reopens a saved preview.

Key What it does
a Approve and start building (keeps pending comments)
s Request changes, type notes, Enter
c Comment on the selected line or range
q Quit the plan and turn Plan Mode off
Tab Move focus between the plan and the prompt

An empty plan still opens this screen. Plan Mode stays on until you approve or quit.

When to skip it

Use Plan Mode for an architecture call, an unclear requirement, or a high-impact restructure. Skip it for a one-path fix, a rename, formatting, or a read-only look at the tree.

Pitfalls

  • Plan Mode gates edit tools only. Reads, bash, and MCP still follow your permission mode. A shell redirect can still write a file.
  • Subagents are not edit-gated by the parent plan. They do inherit ask / auto / always-approve.
  • Status shows plan while it drafts and plan approval on the review screen. The auto or always-approve flag comes back after Plan Mode ends.