Browse docs
Docs

Plan & Agent modes

The three modes that control what the lead agent can do on each turn.

The lead agent has three modes. You choose one per turn, so you can explore safely and only grant write access when you're ready to build.

The modes

Ask

Read-only question answering with no project mutations. Use it for quick "how does this work?" questions where you don't want any tool calls against the project.

Plan

Read-only tools — list files, read files, search — paired with a planning prompt. Plan mode is for exploration and design: the agent can understand the codebase and propose an approach, but it cannot change anything.

Agent

The full toolset: read, write, and run commands. This is where implementation happens — the agent edits files, runs the dev server and tests, and can dispatch sub-agents.

Ask    →  talk about the code
Plan   →  read + design, no writes
Agent  →  read + write + run

Why switch per turn

Modes change tool availability on a per-turn basis, which gives you a natural rhythm:

  1. Plan a change until the approach is right.
  2. Switch to Agent to implement it.
  3. Drop back to Ask to sanity-check the result.

Streams and recovery

Each turn creates a completion stream — a single execution attempt. Streams end when the agent finishes, you stop it, it errors, or it loops. The raw message log is written to disk after each stream, so a refresh, crash, or server restart never loses your history — the conversation is reconstructed from that log, not from memory.

You can stop mid-stream and continue later; continuing starts a fresh stream that picks up where you left off.