◉CLAUDE LABJP
●2.1.296 — Sonnet 5.5 cache reads drop to $0.10/Mtok (was $0.20), and the MCP description limit rises to 4,096 characters●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 51 days left. Migrate to Sonnet 5.5●Q&A — A long-running report: the console jumps back to the top of history whenever output is appended●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●NEW — When first requests keep missing, hand over a one-page description of your work first●2.1.296 — Sonnet 5.5 cache reads drop to $0.10/Mtok (was $0.20), and the MCP description limit rises to 4,096 characters●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 51 days left. Migrate to Sonnet 5.5●Q&A — A long-running report: the console jumps back to the top of history whenever output is appended●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●NEW — When first requests keep missing, hand over a one-page description of your work first
Articles/Claude Code
⟐ Claude Code/2026-07-18Advanced

I Believed Plan Mode Only Read — Replacing That Belief With Machinery

Claude Code 2.1.212 fixed a bug where plan mode ran file-modifying Bash commands without the permission prompt or the SDK canUseTool callback. Here is what could happen while that assumption was broken, how to verify your own setup, and how to stop leaning on a mode name for safety.

Claude Code259Permissions6Plan ModeUnattended Automation3Security12

✦ Premium Article

One line in the changelog stopped me.

"Fixed a bug where plan mode executed file-modifying Bash commands such as touch and rm without going through the permission prompt or the SDK's canUseTool callback."

I am an indie developer, and I run research jobs overnight while I sleep. I had been treating plan mode as a mode that only reads. So I relaxed my deny rules there, and I skimmed the canUseTool logs rather than watching them. The place I thought was guarded had been open the whole time. I did not find good words for the small cold feeling that followed.

Nothing broke in my environment, as far as I can tell. But "I found nothing" and "nothing happened" are different sentences. This is a record of the work I did to close that gap.

What was actually slipping through

The facts first. Claude Code 2.1.212, released on July 18, 2026, fixed this path:

Path Before the fix After the fix
Interactive permission prompt Not shown for file-modifying Bash in plan mode Asks for confirmation as usual
SDK canUseTool callback Never invoked; the command ran anyway Invoked like any other tool call
deny rules in settings Evaluated — this path held Still evaluated

The third row is the one worth sitting with. Deny rules kept working. What broke was only the part I had assumed from the mode's character. Explicit prohibitions survived; implicit expectations did not.

That asymmetry maps exactly onto my own mistake. The rules I had relaxed were the ones I skipped because "plan mode is read-only, so I don't need them here." The hole was precisely the shape of the assumption.

"Read-only" was never written down

Afterwards I went looking for where my belief came from.

The documentation describes plan mode as a mode for forming a plan before you start implementing. Reading that, the picture that forms naturally is "a mode that investigates and proposes." In daily use, writes almost never happen, which reinforces it.

But nowhere does it say that file-modifying tools are mechanically blocked. I had read a tendency as a specification.

That was the real lesson. A mode name expresses intent, not a guarantee. And because intent holds nearly all the time, it is easy to mistake it for a guarantee — then drop your defenses, and let the first exception through in full.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A throwaway probe script that reproduces the write-bypass boundary in about eight seconds on your own machine
✦Concrete settings that move the guarantee out of the mode name and into deny rules plus canUseTool
✦A five-step audit for finding the other places where a feeling became a specification
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-09-05
My deny rule was watching a filename, not the routes that reach it
One line in deny let several other spellings of the same file walk right past. Here is the small matrix I build to list every route to a protected file, and how I re-check it on upgrade day.
⟐ Claude Code2026-08-06
The Skill Call That Returned Nothing — Pinning Down Name Resolution Before an Unattended Run
A skill whose name collides with a built-in terminal command may never resolve in a non-interactive session. Here is a preflight that builds the effective-name table before launch, plus the measured run where the checker itself silently skipped two entries.
⟐ Claude Code2026-07-30
You Added a Second Working Root — Now Ask How Far Your Ignore Rules and Deny Patterns Actually Reach
Adding a working root mid-session does not carry your ignore rules or deny patterns with it. Measured evidence from git check-ignore and a three-way matcher comparison, plus the scope-delta audit script I now run from the DirectoryAdded hook.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links