Skip to content

Plan mode / read-only agent

Plan mode is a posture: the agent can read, search, grep, and reason — but cannot write, edit, or run mutating commands. You drop into it when you want a plan, a code review, a “tell me what you’d change before you change anything,” or a safe exploration of an unfamiliar codebase.

It’s the same idea everywhere — think first, act later — but each tool implements it differently: a toggle in Claude Code, a flag combination in Codex, a separate primary agent in opencode, and — newer and more structured — a first-class IDE mode in Cursor 2.0 and in Copilot Chat (sitting alongside Ask, Edit, and Agent).

You say “refactor the payments module to use the new transaction API.” The agent starts editing. Before you’ve finished forming a mental model of what it’s doing, it’s three files deep, two abstractions in, and confidently moving toward a design you can already tell you wouldn’t have chosen. Now you’re either reading every diff to catch the wrong turn, or rolling back and starting over with a longer prompt.

The problem isn’t that the agent is wrong. It’s that you handed it a direction and it interpreted that as a go. You wanted to align on approach first. The agent doesn’t pause to align unless you explicitly tell it to.

That’s the gap plan mode closes. In plan mode the agent literally can’t edit, so it has to put the plan in front of you first. You read it, push back, adjust, and only then drop out of plan mode to execute. The same conversation, but with the alignment step put back where it belongs — before the writes, not after.

Real-world examples of when you’d switch into plan mode:

  • Non-trivial refactors — anything touching more than two files. Have the agent map the change set before any edits land.
  • First contact with an unfamiliar codebase“give me the tour: where’s auth, what’s the data model, what’s the testing pattern” without any risk of accidental writes.
  • Code review — paste a diff (or point at a branch) and ask for findings. No edits, just analysis.
  • Architecture discussions“if we wanted to split this monolith, what would the seams be?” The output is a doc, not a PR.
  • Pre-incident dry runs“walk me through how a rollback would work if the deploy fails” without the rollback actually running.
  • Reviewing the agent’s own proposal — when the agent suggests a design, switch to plan mode to discuss it before letting it implement.

The test: if the right next action is “talk about it,” not “do it,” you want plan mode.

You want to…Reach forNot
Have the agent think and propose, but not modify anythingPlan modePermissions tuning per call
Permanently restrict a worker to read-onlySubagent with read-only toolsPlan mode
Block specific dangerous commands while keeping the rest permissivePermissions / hooksPlan mode
Get a structured plan artifact (file, checklist)Skill that produces a plan + plan modePlan mode alone
Pause the agent mid-flow to check approachPlan mode toggleRestarting the session

Plan mode is a session-level posture, not a permanent setting. You flip in, get your plan, flip out, execute. If you find yourself never flipping out, what you actually wanted was a read-only subagent or a tighter permissions profile.

Press Shift-Tab to toggle Plan mode. Or invoke /plan to enter.

In Plan mode:

  • Read, search, and grep tools work normally.
  • Write, Edit, and Bash (non-read commands) are blocked.
  • Claude is instructed to produce a plan, not action.
  • Toggle Shift-Tab again (or accept the plan) to drop back into normal mode.

Plan mode is a session toggle, not a separate agent — it modifies the active agent’s permissions for the duration.

AspectClaude CodeCodexopencodeCursorCopilot
MechanismSession toggle (Shift-Tab)Sandbox + approval comboPrimary agent (Tab)First-class IDE mode (Shift+Tab / dropdown)First-class IDE mode (mode dropdown)
Mid-session toggleYes (Shift-Tab)Yes (/permissions picker)Yes (Tab)Yes (mode picker / Shift+Tab)Yes (mode dropdown)
Edit attemptsBlocked by modeBlocked by sandboxGated to ask/denyRead-only research; plan emitted as editable markdownNo execution — produces a plan artefact
Plan artefactInline chat outputInline chat outputInline chat outputEditable markdown file (home dir or workspace)Structured plan in chat (steps, risks, acceptance)
Custom plan-like profilesNoCompose your own flagsYes (custom primary)Plan-with-one-model, build-with-anotherCustom .agent.md planning agents
Preserves history on switchYesN/A (restart)YesYesYes
  • “Plan mode” in Claude Code is a toggle. In opencode it’s a primary agent. In Codex it’s an emergent combination of flags. In Cursor and Copilot it’s a first-class IDE mode with a dedicated picker entry. Always say which.
  • The Claude Code /plan skill is different from Shift-Tab Plan mode — /plan is a skill that asks Claude to outline a plan; Plan mode is the permission posture. They’re often used together.