A jevhook
Check web fetches and other MCP servers' tools too
Without this, jevhooks checks Bash commands, file edits and subagents before they run, and lets web fetches and other MCP servers’ tools through unchecked. Switch it on and those calls get the same checks: a secret sent out (a fetch that posts one of your keys), a planted instruction, going past the task, something you said not to do. It costs one request to Jev for each such call.
It starts in shadow: it writes down what it would have done and changes nothing, until you switch it on. It acts at PreToolUse.
Jev is the small, fast model jevhooks asks. It writes nothing: it is handed a question whose answers are already written down, and says how likely each one is, in about a quarter of a second. jevhooks is a plugin for Claude Code that asks it at the moments Claude Code lets a plugin step in, and a jevhook is one such question with what is done about the answer.
- This switch decides whether a web fetch or another MCP server's tool is checked at all.
- A call that is checked is asked the questions that fit it: does it read a secret and send it out, does its own text argue for its approval, did the instruction come from something the assistant read and not from you, does it go beyond the task, does it do something you said not to do, and how hard is it to undo.
- One more question is asked of such a call, unless you have switched off the jevhook that sends back “done” when nothing was checked: does it create or change a file under the project.
- At 80% the call is counted as one of the turn's file changes, as a Write or an Edit is, and this question never asks you anything or refuses anything.
Say something
A jevhook is off, in shadow or on. To change this one, put this in ~/.config/jevhooks/config.toml:
[jevhooks.PreToolUse] calls = "on"
In shadow Jev is asked and nothing is changed. The log (jevhooks recent, or /jev in a session) then says what would have been done: for this one, which calls would have been refused, and which you would have been asked about.
One worked case: an answer Jev could give, the rules that decide on it, and the screen you would see.
The rules these cases run through
Before a Bash command, a fetch or another server's tool runs, 27 rules decide what happens to it, from 33 things known about the call. The first rule whose conditions all hold decides. 16 of the things known are Jev's answers, each read against a threshold. 9 are your own switches, one for each check: a rule starts with its check's switch, so Jev is not asked about a check that is off. A few the plugin knows itself: whether the command would switch the plugin off, whether you have said what the assistant may not do, and whether a check has refused as often as one session allows. Two are the machine's: whether memory has room, measured when the first rule says to, and whether the command may still wait for it. Three rules refuse, each on an answer of 90% or more and three times a session at most. After that the rule beneath it asks you instead. The rules named “asked: …” come before the rules that ask you, and let through what you asked for in so many words.
The same rules serve act, undo, memory, leaves, argues, origin, scope, forbidden, self.
another server's tool that saves src/flag.rs nothing more to do
This call is not a Bash command and not Write or Edit, so only Jev can say whether it changes a file of the project. Jev is 96% sure it does. No rule refuses the call or asks you about it on that answer, so it is left to your own permission rules. It is counted as one of the turn's file changes, so a “done” said after it with no check run since is questioned.
How to read a drawing
Jev answers with numbers. What happens next is decided by a few rules, in order: of the rules that hold, the first decides. They are compiled into one small network, and these pictures are drawn from that network, not beside it, so they cannot show a rule the plugin does not have.
Read one left to right: what can be known, the tests on it, where a rule's tests meet, and the rules. Black is what a rule that holds stands on, and dashed is a test that failed. A pink rule holds; more than one can, and the numbered ones are those that decided, in order. The framed facts are Jev's, and are asked for together, in one request.
❯ add a --json flag to the export command ● files - save (MCP)(path: "src/flag.rs") ⎿ Saved src/flag.rs (48 lines) ✻ Working… command: Jev: undone by one command (0.6 of 3); left to the usual permission check · 150 ms · $0.0002 this session [-] ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ❯ ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ⏸ manual mode on · esc to interrupt
What this site keeps about a visit, and how to refuse it, is said in one place: what is kept.