Rules checked before the agent acts.
TollWire checks file writes, shell commands and new dependencies before they run, and blocks recognized violations. Every decision lands in a hash-chained log.
- The plugin code makes no network requests
- Fail-closed if the hook cannot run for a checked tool
- Defense in depth, not a sandbox
Follow one tool call, step by step
Pick a case and watch what happens between “the agent wants to act” and “a record exists”. Play, pause or step through it with the buttons or the arrow keys.
Keyboard: focus the black panel, then ← / → for scenes and Space to play or pause. With reduced motion enabled in your system, nothing plays by itself and text appears at once.
Replay recorded output of TollWire 0.1.6 (demo project). Scenes 1 to 5 show output of the real hook (dist/hookCli.js) run on 2026-11-26 in a temporary demo project with the demo account demo@demo-host, including stderr text, exit codes and log hashes. The three check lanes in scene 2 are a schematic view. Scene 6 is optional and belongs to the separate enterprise edition: the Wazuh rule IDs and texts come from its rule file, the values are synthetic; it is not a recording of a Wazuh run.
Three checks in one place
A hook inside the agent evaluates checked tool calls against your policy and blocks recognized violations. If the hook cannot run for a checked tool, the call is blocked instead of allowed.
-
Protected paths
Writes to configuration, policies, CI, git hooks and agent setup are blocked, and so are writes outside the project directory. Common detours such as symlink targets are accounted for. No guarantee.
-
Dangerous commands
Shell commands are checked heuristically against your rules before they run, for example force pushes or
sudo. Known bypasses such as loader variables are accounted for. -
Dependencies
New packages are checked against an allowlist. The default policy ships an empty allowlist, so installs are blocked until you approve packages.
Honestly scoped. The check is a blocklist: what no rule recognizes is allowed. It does not analyze script files, make or npm run, and it works only if the agent loads the hook. TollWire is defense in depth, not a sandbox and does not replace an audit. Run the agent in a container or sandbox as well. See “Limits” in the README.
One policy engine, several agents. Honest status.
Claude Code has the plugin hook. The other adapters pass each agent’s pre-execution hook call to the same decision engine, and they are experimental. What happens when a hook fails differs per agent, so the badge tells you whether a block is really enforced.
Claude Code
ENFORCEDPlugin hook (
PreToolUse). Fail-closed for the checked tools: ifnodeor the hook is missing or crashes, the call is blocked.Codex CLI
ENFORCEDEXPERIMENTALDeny = exit code 2 plus a deny JSON on stdout. Codex asks you to review and trust non-managed hooks (
/hooks) before they run.Cursor
ENFORCEDEXPERIMENTALFail-closed only if the hook is registered with
"failClosed": true. Without it the adapter is DEGRADED: a crash or timeout lets the call through.Copilot CLI
DEGRADEDEXPERIMENTALAn explicit deny blocks (exit 2 plus deny JSON). A hook timeout is fail-open: the tool proceeds. Keep the hook fast.
Grok Build
DEGRADEDEXPERIMENTALFail-open on crashes, timeouts and malformed output; only an explicit deny blocks. The adapter emits an explicit deny on any error it can catch.
Status of the adapters: they are tested against each agent’s documented hook format, not against every agent release, and a live run on each installed CLI is still pending. A Gemini CLI adapter is not shipped. Setup per agent: multi-agent guide. Product names are trademarks of their respective owners; TollWire is not affiliated with or endorsed by them.
How it works
Four steps, all on your machine. TollWire sends neither code nor prompts anywhere.
Intercept
The agent is about to write a file or run a command. The hook receives the call first.
Check
Paths, commands and dependencies are compared with your policy. Recognized violations are hits.
Decide
No hit: exit 0, the call goes through. Hit or error: exit 2, blocked, with the reason on stderr.
Record
Each evaluation is written to a hash-chained decision log you can verify. You can switch it off.
Where TollWire sits
A PreToolUse hook between the agent and the system. In the enterprise edition the decision log is also forwarded to your SIEM.
- Coding agent sends a Write, Bash or Edit call.
- TollWire hook (
PreToolUse) checks paths, commands and dependencies against your policy. - No hit: exit 0, the call goes to the system. Hit or error: exit 2, blocked.
- Each decision is written to the hash-chained decision log. Control mappings (ISO 27001, NIS2, SOC 2) are drafts, not audited. The enterprise edition forwards the log to a SIEM.
- allowed → system
- violation → blocked
- control & evidence layer
Records, not chat logs
Every evaluation becomes an event in a hash chain, and the evidence server records changes, reviews, scans and approvals the same way. Event types are mapped to controls as a draft mapping, not audited. TollWire supplies records; it does not certify anything and does not replace an audit.
| Seq | Tool call | Rule kind | Decision | Hash |
|---|---|---|---|---|
| 2 | Write .git/hooks/pre-commit | protected_path | deny | ae3fd3e20dbd… |
| 3 | Bash npm install left-pad | dependency | deny | a124cebe4fe5… |
| 4 | Write /etc/demo-outside.txt | outside_project | deny | 6ebf95918f80… |
| 5 | Edit src/routes.ts | none | allow | 6eb15aa509a9… |
- ISO/IEC 27001:2022 Annex A draft mapping, not audited
- NIS2 Article 21(2) draft mapping, not audited
- SOC 2 draft mapping, not audited
Limits of the log: it detects changes, it does not prevent them. Whoever rewrites the whole file can create a new, internally valid chain; external anchors detect this only up to the last anchor. The actor value is self-declared.
Check what you install
Don’t take our word for it. Releases come with checksums and an SBOM, and you can compare the file you downloaded with the copy npm serves.
npm packages
@tollwire/guardrail-plugin and @tollwire/evidence-mcp, version 0.1.6. No install scripts; --ignore-scripts is safe.
GitHub releases
Each release ships the .tgz packages, SPDX SBOMs and a SHA256SUMS file.
Read before you run
A plugin runs code with your user privileges. Read hooks/hooks.json and .mcp.json first and pin the version. See the security notes.
The checksum check covers the file you downloaded, not the copy npm serves. The npm value must equal sha512- followed by the base64 SHA-512 of the checked .tgz; details in the README.
Three commands in Claude Code
Needs Node.js 22.12 or later and npm. Each plugin installs on its own; you can install only the guardrail.
The marketplace entry has no integrity digest: verify the release first (above) and read the security notes. Uninstall steps are in the README.
Evaluating TollWire at work?
TollWire is source-available under the PolyForm Noncommercial License 1.0.0 (not open source), free for personal, academic and noncommercial use. Teams that want to evaluate it in a commercial environment can request a free, time-limited Proof-of-Concept license before any paid agreement. We are looking for pilot teams.
For managed machines
A separate, commercial package: a root-owned policy that users and agents cannot change, a fixed system Node, forwarding of the decision log to your SIEM (for example Wazuh) and an admin view. It is not part of the public repository. macOS and Windows are planned.
There is no sign-up form and this page collects no data. Please describe your use only in general terms in a public issue and include no confidential information.
Legal notice
Provider: the owner of the public repository github.com/TollWire/tollwire. Contact: issues in that repository or the request route in its LEGAL.md.
Project, source code and contact: the public repository github.com/TollWire/tollwire. Please report security issues through its SECURITY.md (private vulnerability reporting), not as a public issue. License: PolyForm Noncommercial 1.0.0, source-available, not open source. Commercial use requires a separate license. The ISO/IEC 27001, NIS2 and SOC 2 mappings are drafts, not audited, and no certification.
Privacy
This page sets no cookies, uses no trackers or analytics, loads no external resources and has no forms, so it collects no personal data. The replay runs entirely in your browser. The page is hosted on GitHub Pages; GitHub may process technical server logs (such as IP addresses) as described in its own privacy statement.