arrester

Reviewed at commit cd65844

After a hook, a deny rule or auto mode blocks a tool call, stops recognized detours to the same target through another tool or a shell rewrite, such as head…

Made by
dot-agi
What we checked

After a hook, deny rule, auto mode or your own No blocks a tool call, it refuses (or asks you about) later calls that reach the same files another way or touch your Claude settings and hook files, for 30 minutes by default. It only ever denies or asks, never approves; it reads the paths and scripts those calls name, keeps its record in memory only, makes no network calls and runs no programs.

Review details

Static review of the source at the pinned commit; not run. Full re-review: the diff since 1c73794 (237k chars, mostly hooks/analyze/shell.ts and lexer.ts) was too large for a delta review. Hooks: session.start (registers the immediate /arrester command, syncs the status line), session.end (clears status, keeps the session's journal in module memory for up to 32 ended sessions), classic.SessionStart (new: on /branch or in-app /resume restores the open blocks of the previous session from that memory), classic.PreToolUse (passes through and notes whether a lower hook denied), tool.check and classic.PermissionDenied (record a block when a rule, PreToolUse hook or the auto-mode classifier denied), tool.call (while blocks are open, statically analyses the call and returns deny, or in hold mode asks via $.ui.ask with Deny / Allow once; otherwise forwards it and records a block when the result text shows a hook or user rejection), command.run for /arrester status, history and clear (clear only from the user's own origins: composer, bridge, sdk). Runtime calls: $.state atom via read/update (journal of blocks with call summaries up to 120 chars, reasons up to 300, target paths, decisions), $.fs.exists/stat/read (stat of paths a call names; text of a script a call runs, at most 256 KiB, only while a block is open or being recorded), $.env.get('HOME'), $.settings.read for the user, project, local, flag and policy sources to find hook files to treat as guards, $.session.cwd/root/turns, $.clock.now/after, $.ui.log, $.ui.status, $.ui.ask, $.command.register. Guards are ~/.claude/settings.json, project .claude/settings.json and settings.local.json, the plugin's own folder, ~/.claude/plugins (changes only) and files named by command hooks. If its own check fails while blocks are open it denies the call (fails closed); with no open blocks it passes calls on. The analysis modules (call, shell, lexer, code, paths, programs, guards, journal, match, text) are pure: they parse shell commands and interpreter code (-c/-e) as text and never execute anything; the only I/O in them is the readScript callback. Notable changes in this version: Grep and grep-like searches without a file filter now count a searched folder as a target (sparing home, project and session folders and guard paths), a guard reason that names only some of a call's targets narrows the block to those, journal carry-over across /branch and /resume, and larger shell parsing coverage. register.ts, call.ts, guards.ts, journal.ts, match.ts, text.ts, types and plugin.json were read fully; shell.ts (264 KB, truncated in the bundle), lexer.ts, code.ts, paths.ts and programs.ts were reviewed through the clone by targeted search for imports, engine/$ calls, fetch, process, eval and file writes (none found) plus the I/O-relevant parts of the diff. The only import outside the plugin is the 'claude-code' runtime module. README discloses no network, model or process use and memory-only storage, which matches the code.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Screenshot of arrester

After a hook, deny rule, or auto mode blocks a tool call, Arrester stops later calls that reach the same result another way or read or change your guards. After your No, it stops only exact retries.

Made this mod? Add a badge to your README

modsforClaude badge for arrester

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/arrester.svg)](https://modsforclaude.com/mods/arrester/)

← All mods