sandbox-tuner

Reviewed at commit 967a05c

Explains the sandbox blocks it recognizes in Bash results in plain words above the prompt, counts blocked hosts and write folders across sessions, and once a…

Made by
dot-agi
What we checked

Reads the output of Bash commands for sandbox block reports, explains each block in a band above the prompt and a /sandbox-tuner pane, and counts how often hosts and write folders recur. Only when you press Allow, Deny or Undo does it change one entry in your user settings, keeping a backup copy, a short-lived lock file and an Undo list. It makes no network calls and runs no programs.

Review details

Static review of the source at the pinned commit; not run. Full re-review of version 1.3.1 (the diff since dbda993 rewrites most of register.tsx). Registers session.start (registers the /sandbox-tuner command, loads saved state, starts the link check), session.end and classic.SessionStart for clear/resume/fork (per-session view with the new scope option, default session; branch lineage records; a 500 ms poll of the session id for at most 5 minutes while a /clear or /resume settles), tool.call for Bash and Monitor (awaits the result, returns it unchanged, and parses the trailing <sandbox_violations> report, the stderr report, allowed_domains and permission-error lines into host and folder sightings), ui.render for AbovePrompt (band with Allow, Deny, Open, Dismiss) and its Pane, and command.run. Runtime calls: $.settings.read (merged and per source), $.env.get (HOME, CLAUDE_CONFIG_DIR, PATH), $.session.id/cwd/root/surfaces, $.store get/set/keys/delete (sighting records with host or folder, ports, program names and session ids, hidden flags, branch lineage records, refusal markers, an Undo journal of at most 50 entries; command text only in session state, cut to 120 characters), $.fs exists/read/write/stat/list, $.ui toast/open/log/invalidate/resolve, $.command.register, $.clock now/every/after/sleep. File writes happen only on a button press and only to the user settings.json ($CLAUDE_CONFIG_DIR or ~/.claude), a copy of its previous text at backups/settings.json.sandbox-tuner.bak in the same folder, and new in this version a lock file settings.json.sandbox-tuner.lock beside it holding a random token and a time; each press adds or removes a single entry in sandbox.network.allowedDomains, sandbox.network.deniedDomains or sandbox.filesystem.allowWrite, re-reads and re-checks under the lock that the file did not change, reads the file back, and Undo removes only the entry it added. Allow is offered only after a configurable number of sightings (default 3) and only for DNS host names and cache or temp folders; it refuses protected places (.claude settings, hooks, skills, agents, commands, .git hooks/config, shell startup files, .mcp.json, editor folders), credential folders, system folders, PATH folders, the working directory and anything a deny rule covers, resolving symlinks first. To find links into opened folders it lists directory entries (names and link targets only, no file contents) under the Claude config folder, ~/.vscode, protected places and credential folders such as ~/.ssh and ~/.aws, bounded to 1000 folders and 25000 entries; in interactive sessions this now runs at each session start and on a timer (linkCheckMinutes, default 15, 0 turns it off), warns with a toast when such a link exists and writes nothing. Settings parse errors are logged without file text. No fetch, sockets, processes, eval or model calls. Read in full: plugin.json, hooks.json, register.tsx, types/index.d.ts, diagnostics.ts, names.ts, records.ts, settings-file.ts, sightings.ts, verdicts.ts, shapes.ts; views.tsx and words.ts (rendering and sentences) checked by targeted search for runtime calls (none, only Button handlers passed in from register.tsx). The unresolved ../types imports are the included types/index.d.ts.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: no
  • 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 sandbox-tuner

Explains each Claude Code sandbox block in plain words and turns recurring blocks into reviewed, one-press, undoable edits of your user settings.

Made this mod? Add a badge to your README

modsforClaude badge for sandbox-tuner

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/sandbox-tuner.svg)](https://modsforclaude.com/mods/sandbox-tuner/)

← All mods