Skip to content

blast-radius: optional auto-skip for temporary files, configurable hold time - #22

Open
Vasiliy-Bondarenko wants to merge 5 commits into
anthropics:mainfrom
Vasiliy-Bondarenko:blast-radius-auto-skip
Open

Vasiliy-Bondarenko wants to merge 5 commits into
anthropics:mainfrom
Vasiliy-Bondarenko:blast-radius-auto-skip

Conversation

@Vasiliy-Bondarenko

@Vasiliy-Bondarenko Vasiliy-Bondarenko commented Nov 6, 2026 •

Copy link
Copy Markdown

Why

In a few days of use, nearly every command Blast Radius held was Claude cleaning up after itself: rm -rf on its own scratchpad, dumps it had just downloaded into tmp/, install logs, caches. A pane for each one gets in the way and trains people to press Proceed without reading.

What

A new autoSkip option, off by default. With it off, the mod behaves as before; a test checks that classify() reads every test case the same as the committed version.

  • rules: an rm runs without the pane when every path (after $VAR, ~ and symlink resolution) is inside this session's scratchpad, or doesn't exist. Every rm on the line must pass. Before the rm, the line may only run commands that read or write plain files. Lines with heredocs, $(...) or braces are left to the next step.
  • rules+model: other rm commands are described to an OpenRouter Decisions model (~perplexity/pplx-decider-latest by default), with a short legend. The request carries facts, not the command text: size, up to five file names, git tracked/ignored, birth time against the session start, earlier mentions in the session and on the same line. If the model's rating reaches caution (low, medium or high: 0.8, 0.9 or 0.97), the command runs, and a toast says why. Otherwise the pane opens with the rating in its note. If the model fails or takes longer than 8 seconds, the pane opens.
  • Some deletions never go to the model: top-level folders, files git tracks, .git, .env, secrets, backups, .sql dumps, migrations, more than 100 MB or 5,000 files, and paths with .. or braces that only the shell can resolve.
  • rm inside ssh '...' or docker exec/kubectl exec goes through the same steps, but the rules never skip it.

Also:

  • New holdMinutes option: how long a held command waits for an answer. Default 10.
  • A refusal after an error while holding now names the error. In practice the error came from the mod being reloaded while it held a call.

Tests

  • node --test tests/autoskip.test.mjs: 135 offline checks, all passing. They run in a sandbox file tree with tracked, ignored, old and new files and a symlink. The 63 cases are modelled on real sessions (paths made up), built to get past simple rules, or held out.
  • DECIDER_LIVE=1 OPENROUTER_API_KEY=... node --test tests/decider.live.test.mjs: sends every case to the model once. It fails if any dangerous case would run without the pane at any caution level. A run costs well under a cent.
  • The prompt went through six versions, each followed by a live run. Run-to-run noise was ±0.006 on average. The README has the details. With the final prompt, the model on its own rated no dangerous case above 0.35 on the known cases, or above 0.04 on the 15 held-out ones. At medium, it rated 18 of 21 known and 6 of 8 held-out temporary cases as disposable.
  • claude plugin validate passes.

Not done: a recorded run in a live Claude Code session with auto-skip turned on, and new screenshots.

I have read the CLA Document and I hereby sign the CLA

…ld time

Most commands Blast Radius held in practice were Claude removing its own
scratch files. A new autoSkip option, off by default, lets those run
without the pane:

- rules: an rm whose paths all resolve (after $VAR, ~ and symlinks) into
  this session's scratchpad, or don't exist, runs at once.
- rules+model: anything else is described to an OpenRouter Decisions
  model as structured facts (size, sample file names, git status, birth
  time against the session start, earlier mentions). The command text
  is not sent. A floor of checks (top-level folders, tracked files,
  secrets, backups, migrations, large trees, unresolvable paths) keeps
  those deletions from the model entirely.

Also:
- holdMinutes option for how long a held command waits (default 10).
- A refusal after an error while holding now names the error.
- Offline tests (63 cases in a sandbox file tree) and an opt-in live test
  of the model, with held-out cases.
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Vasiliy-Bondarenko

Copy link
Copy Markdown
Author

recheck

@Vasiliy-Bondarenko

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA
recheck

github-actions Bot added a commit that referenced this pull request Nov 6, 2026
With autoSkip on, every rm decision leaves a dim transcript line the model
doesn't read, saying whether it ran without the pane or was held, and why.
The classify() equivalence test now compares against the version before
auto-skip instead of HEAD.
… makes

The rules check paths before the command runs, so a folder made earlier in
the same line read as "nothing to delete". It now says the command deletes
only what it makes first.
…et redirect output go

- Facts: for a folder that is itself a git checkout, whether it has a remote
  and any uncommitted, unpushed or stashed work; .git internals stay out of
  the sample file names.
- Question: a checkout that can be cloned again with no local work loses no
  source code. A broader rewording was tried and dropped: it raised the
  ratings of tracked files, migrations and config.
- Rules: a file the line writes with a redirect and otherwise only reads
  (including inside $(...) and pipes) is the line's own output, so its rm
  runs without the pane.
- Tests: 70 cases, among them clones (clean, uncommitted, unpushed), redirect
  loops from sessions, and mv traps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant