Plan mode in Claude Code: plan first, then edit the code
In plan mode Claude Code reads your code and proposes a plan but edits nothing until you agree. How to enable it, use it and what it costs.
6 min · · агенты · экономия
The most expensive mistake when working with a coding agent is when it confidently rewrites the wrong thing. You end up with a hundred changed lines, an hour of review and a rollback to do. Claude Code's planning mode exists for exactly this: the agent first reads the code and shows a plan, and starts editing files only after you agree. Below is how to turn on Claude Code plan mode, how to approve a plan, how to pair it with a cheaper model for execution and what it costs in tokens. The description is built on the Claude Code documentation (the permission modes and common workflows sections) as of October 2026. Menu item names and versions can change, so check against the documentation.
How to turn on Claude Code plan mode
According to the documentation, in planning mode Claude reads files, can run commands to explore, writes a plan, but does not change your source code. Edits stay blocked until you approve the plan. There are three ways to enable it:
- press
Shift+Tabin a session until the status bar shows⏸ plan mode on(modes cycle one after another: the normal mode, accepting edits and plan); - put
/planbefore a single request, so planning applies to that request only; - start the session in this mode right away:
claude --permission-mode planPressing Shift+Tab again leaves planning mode without approving a plan. To make the mode the default for a project, add the value defaultMode: "plan" to the permissions block in .claude/settings.json. In the VS Code extension the starting mode is set by a separate setting, claudeCode.initialPermissionMode; it does not read the project file.
Plan mode is a feature of the client itself. It works the same when Claude Code is connected to Zukko: the connection settings are the same as in the Claude Code guide (address https://api.zukko.pro without /v1, the key in ANTHROPIC_AUTH_TOKEN, the model in ANTHROPIC_MODEL).
How to approve a plan
When the plan is ready, Claude Code shows it and asks what to do next. According to the documentation, the options are:
- approve and continue in a mode with fewer confirmations (the wording depends on settings and version);
- approve and confirm each edit by hand;
- decline and keep planning, telling the agent what to change.
Press Ctrl+G to open the plan in your text editor and edit it right there before the agent starts work. After approval planning mode closes and the agent begins editing. To plan again, return to the mode with Shift+Tab or start your next request with /plan.
What to check in a plan
Do not accept a plan until it contains four things:
- A list of files that will be changed, and those that must not be touched.
- The order of steps: migrations and interfaces first, the things that depend on them later.
- How to verify the result: which tests to run or which command to execute.
- Risks and assumptions: what the agent relies on without confirmation.
A good planning request:
We need to move permission checks from controllers into middleware.
Study how authorization works now and propose a plan: which files change,
in what order, which tests to add. If something is missing for a decision, ask questions.
Do not change the code yet.If the plan shows a wrong premise, reply with it rather than cancelling everything: "No, keep planning" with a clarification is cheaper than sorting through a failed implementation.
How many tokens a plan takes
Planning is not free, but the extra cost is small. The agent reads the code either way, with or without a plan. What is extra here is the output tokens of the plan itself and resending the accumulated context during approval.
An example with assumed volumes. The agent read about 60,000 tokens of code and wrote a 4,000-token plan, with planning done on claude-opus-5-5 (input 0.8, cache read 0.08, output 4, $ per 1M tokens, as of 18 October 2026):
- plan output: 4,000 × 4 / 1,000,000 = $0.016;
- re-reading the context from cache during approval: 64,000 × 0.08 / 1,000,000 ≈ $0.005;
- extra cost of the plan in total: about $0.021.
For comparison, execution on claude-sonnet-5-5 (input 0.4, output 2) with 120,000 input tokens and 15,000 output tokens over a series of steps costs 0.12 × 0.4 + 0.015 × 2 = 0.048 + 0.030 = $0.078. If the agent went the wrong way and everything must be redone, you pay that amount again, not counting your review time. So a plan pays for itself if it prevents a wrong direction in roughly one case out of four (0.021 / 0.078 ≈ 0.27). The numbers are illustrative and ignore caching during execution: plug in your own volumes from the dashboard. The gateway sees the cache for Claude in the Anthropic format, and that is what Claude Code uses; details are in the keys and cache reference.
This also explains when a plan is unnecessary. Fixing a typo, renaming a variable or changing one function from a clear description is simpler to do right away: a plan adds a step while the risk of error is small.
Plan with a strong model, execute with a cheaper one
Claude Code has a model mode called opusplan: according to the documentation, in planning mode it uses an Opus-class model, and during execution it switches to Sonnet. Which models stand behind the aliases is set by environment variables. For the gateway, specify the ids from the Zukko list:
export ANTHROPIC_BASE_URL=https://api.zukko.pro
export ANTHROPIC_AUTH_TOKEN=fetch_your_key
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5
claude --model opusplanPrices and strength index: claude-opus-5-5 costs 0.8 / 4 with index 58; claude-sonnet-5-5 costs 0.4 / 2 with index 48 ($ per 1M tokens, input / output). Think of it this way: a plan on the pricier model costs twice as much per token as the same volume on Sonnet, but execution then runs at the lower price. Whether a plan from one model and execution by another is enough for your repository cannot be known in advance: run two or three real tasks and compare the result and the cost. The current list of models and prices is GET https://api.zukko.pro/v1/models and the Models page in the dashboard. Other saving techniques are collected in Claude Code: saving tokens.
Plan mode in the working cycle
A useful sequence for a non-trivial task:
- Turn on planning (
Shift+Tab) and describe the task together with the constraints. - Read the plan, fix it through
Ctrl+Gor in text, and ask for a list of checks. - Approve the plan with edit confirmations if the task touches critical code, or without them if you trust the direction.
- After execution ask the agent to run the checks named in the plan.
- For the next independent task start a new chat so there is nothing extra in the context.
If you are only getting to know the agent, start with the full Claude Code setup and create a key in the Zukko dashboard. Payment starts at $1: SBP (the payment page adds 8.5% on top), cryptocurrency or MasterCard.
FAQ
Does plan mode change files?
No. In it Claude reads code, can run commands to explore and writes a plan. Edits are blocked until the plan is approved.
Can I use plan mode with any model?
The mode is implemented in the client, and you choose the model yourself. How a specific model copes with planning, check on your own tasks.
How is a plan different from asking "what are you going to do"?
An ordinary question does not block edits: the agent may start working at once. In plan mode the client itself enforces the ban on changing code.
How do I get from planning back to normal work without approving?
Press Shift+Tab again. The mode switches without approving the plan.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- opencode agents: setting up roles, models and toolsA custom agent in opencode is a role, a model and a set of permissions. A working config where a cheap model handles routine work and a stronger one edits code.
- How much an AI agent costs: a step-by-step model spend calculationAgent cost is set by the number of steps, context growth, cache and the model. A formula, three examples with arithmetic and a calculator you can plug your own numbers into.
- Saving tokens in opencode: a checklist of settings and habitsopencode spend comes from habits and a few lines of config. A checklist you can verify: what to turn on, what to remove, and how to see the result in the dashboard.
- Project rules in Qwen Code: context files and token savingsHow to explain project rules to Qwen Code once: QWEN.md, path-conditional rules, skills and MCP, and how many tokens each such file costs.