CLAUDE LABJP
2.1.281 — Claude Code reached 2.1.281 on September 23. The gateway now understands the newer Claude Desktop policy keys, and Bedrock upstreams gain assume_role and a guardrail setting10/07 — The old spellings of the Claude Desktop and Cowork managed config keys stop being accepted at 12:00 PT on October 7, thirteen days from now529 — A report describes background subagents ending mid-task on a transient 529, leaving the parent to piece together what actually survivedNEW — Bracketing PDF input tokens by page count before you send the fileRORK — Rork added Claude Opus 5.5 to its model menu on September 22, so the same model landed in several tools within one weekUNIT — When you hand off a long job, committing after each unit of work means a crash costs you one step, not the whole run2.1.281 — Claude Code reached 2.1.281 on September 23. The gateway now understands the newer Claude Desktop policy keys, and Bedrock upstreams gain assume_role and a guardrail setting10/07 — The old spellings of the Claude Desktop and Cowork managed config keys stop being accepted at 12:00 PT on October 7, thirteen days from now529 — A report describes background subagents ending mid-task on a transient 529, leaving the parent to piece together what actually survivedNEW — Bracketing PDF input tokens by page count before you send the fileRORK — Rork added Claude Opus 5.5 to its model menu on September 22, so the same model landed in several tools within one weekUNIT — When you hand off a long job, committing after each unit of work means a crash costs you one step, not the whole run
Articles/Claude Code
Claude Code/2026-08-10Advanced

The Same rm -rf Was Recoverable in Ten Places and Unrecoverable in Five — Measuring Reversibility Before Auto Mode Becomes the Default

Auto mode becomes the default on Pro, Max and Team from August 14. It stops on operations judged irreversible, destructive, or outward-facing — but reversibility turned out to be a property of state, not of commands. Here is the probe and the measurements.

Claude Code256auto mode3permissions10git17indie development25

Premium Article

I put August 14 in my calendar and then spent half a day finding out what actually changes on my machine.

Claude Code's auto mode becomes the default for Pro, Max and Team. Instead of asking for approval at each step, it stops only on operations judged irreversible, destructive, or directed outside your own environment.

As a sentence, that leaves no room for confusion.

As soon as I tried to map it onto my own setup, though, I stalled. I run overnight jobs as an indie developer — cleaning up build artifacts, regenerating screenshots, reorganizing output directories — and deletions and overwrites are mixed in throughout. I could not say which of those were the irreversible ones.

So I measured, using a whole repository as the test bed. What came out of it was that my starting assumption — that I needed a list of dangerous commands — was the thing that was wrong.

Trying to define "irreversible" by command name

I started the way most people do: scrolling back through shell history and writing down anything that looked risky.

rm -rf, git push --force, git clean -fdx, npm publish, POST to an external API.

The list stopped being useful almost immediately. The same rm -rf behaves completely differently depending on whether the directory is tracked by git or listed in .gitignore. The first comes back in a few hundred milliseconds. The second never comes back at all.

Reversibility, in other words, is not an attribute of the command. It is an attribute of the state of the files that command happens to be pointed at, at that moment.

I was trying to express something state-shaped using a list of command names. That was the first hour of the half day.

I am glad I hit that before writing any deny rules. Enumerated rules get heavier the more you add; I wrote up the cleanup side of that in The Permission Rules You Added for Safety Are Taxing Every Turn — Auditing the Ruleset Without Loosening It.

Writing a probe that measures reversibility

If it is a property of state, then the answer is to measure the state before executing.

What matters is the number of bytes under the target path that git cannot bring back. Tracked and clean files come back. Untracked and ignored files do not.

Here is the probe I actually used. Standard library only.

#!/usr/bin/env python3
"""Classify files under a path by whether git can restore them, and total the unrecoverable bytes."""
import os, subprocess, sys, collections
 
def git(*args):
    r = subprocess.run(["git", *args], capture_output=True, text=True)
    return [p for p in r.stdout.split("\0") if p]
 
def classify(root="."):
    tracked   = set(git("ls-files", "-z"))
    ignored   = set(git("ls-files", "-z", "--others", "--ignored", "--exclude-standard"))
    untracked = set(git("ls-files", "-z", "--others", "--exclude-standard"))
    dirty     = set(git("diff", "-z", "--name-only"))
    staged    = set(git("diff", "-z", "--name-only", "--cached"))
 
    buckets = collections.defaultdict(lambda: [0, 0])   # [files, bytes]
    for dirpath, dirnames, filenames in os.walk(root):
        if ".git" in dirpath.split(os.sep):
            continue
        for name in filenames:
            path = os.path.relpath(os.path.join(dirpath, name), root)
            if   path in ignored:   kind = "ignored"           # unrecoverable
            elif path in untracked: kind = "untracked"         # unrecoverable
            elif path in staged:    kind = "tracked-staged"    # index only
            elif path in dirty:     kind = "tracked-modified"  # edits are lost
            elif path in tracked:   kind = "tracked-clean"     # fully restorable
            else:                   kind = "unknown"
            try:
                size = os.path.getsize(os.path.join(root, path))
            except OSError:
                continue
            buckets[kind][0] += 1
            buckets[kind][1] += size
    return buckets
 
RECOVERABLE = {"tracked-clean"}
 
if __name__ == "__main__":
    b = classify(sys.argv[1] if len(sys.argv) > 1 else ".")
    lost_f = lost_b = tot_f = tot_b = 0
    for kind, (n, size) in sorted(b.items()):
        tot_f += n; tot_b += size
        if kind not in RECOVERABLE:
            lost_f += n; lost_b += size
        print(f"{kind:18} files={n:6d} bytes={size:12,d}")
    print("-" * 46)
    print(f"unrecoverable files={lost_f}/{tot_f} ({lost_f/tot_f*100:.1f}%) "
          f"bytes={lost_b:,}/{tot_b:,} ({lost_b/tot_b*100:.1f}%)")

The six buckets exist for a reason. Only tracked-clean comes back unconditionally. tracked-modified is the in-between case — the file returns, but today's uncommitted edits do not — and counting it as recoverable quietly corrupts the judgment. I deliberately left RECOVERABLE with a single member.

All numbers below were produced by running this in a sandbox: Linux 6.8.0, Python 3.10.12, git 2.34.1, 4 vCPUs, 3.9 GB RAM.

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
If you have been unsure what to put in your deny rules before auto mode flips on, you can now count the unrecoverable bytes in your own repository first and draw the line from data
You will see the same rm -rf come out reversible in 10 targets and irreversible in 5, and move from a list of scary command names to a state-based pre-flight check
You will understand why recovering a force push depends on who still holds the SHA, and set up a recovery path that does not rely on the remote
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-04
The One File I Keep Out of Claude Code's Reach: project.pbxproj
With Xcode project files, the breakage that still opens costs far more than the breakage that refuses to open. Here is what I measured before moving every edit behind a script, and where the line sits today.
Claude Code2026-08-21
My read-deny rules never reached inside the folder I had allowed
An audit of how far permissions.deny Read rules actually reach in a working tree where secrets and source code live side by side, with a script you can run today.
Claude Code2026-09-20
I Was Paying for Pro and Still Getting Billed by the Console
Your subscription and your API usage are two separate ledgers, and Claude Code will happily run on either one. Which credential wins is decided by a precedence list where your login sits dead last. Here is how to read status, and why unattended runs answer differently.
📚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