Repository navigation
blast-radius: optional auto-skip for temporary files, configurable hold time - #22
Open
Vasiliy-Bondarenko wants to merge 5 commits into
Open
Vasiliy-Bondarenko wants to merge 5 commits into
Vasiliy-Bondarenko wants to merge 5 commits into
Conversation
…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.
Vasiliy-Bondarenko
requested review from
addy-ant,
cj-ant and
rlancemartin
as code owners
November 6, 2026 04:52
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
recheck |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In a few days of use, nearly every command Blast Radius held was Claude cleaning up after itself:
rm -rfon its own scratchpad, dumps it had just downloaded intotmp/, install logs, caches. A pane for each one gets in the way and trains people to press Proceed without reading.What
A new
autoSkipoption, off by default. With it off, the mod behaves as before; a test checks thatclassify()reads every test case the same as the committed version.rules: anrmruns without the pane when every path (after$VAR,~and symlink resolution) is inside this session's scratchpad, or doesn't exist. Everyrmon the line must pass. Before therm, 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: otherrmcommands are described to an OpenRouter Decisions model (~perplexity/pplx-decider-latestby 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 reachescaution(low,mediumorhigh: 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..git,.env, secrets, backups,.sqldumps, migrations, more than 100 MB or 5,000 files, and paths with..or braces that only the shell can resolve.rminsidessh '...'ordocker exec/kubectl execgoes through the same steps, but the rules never skip it.Also:
holdMinutesoption: how long a held command waits for an answer. Default 10.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.medium, it rated 18 of 21 known and 6 of 8 held-out temporary cases as disposable.claude plugin validatepasses.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