A jevhook
Ask before the plugin is switched off
jevhooks is a Claude Code plugin that checks what the assistant is about to do, and a check the assistant can switch off by itself is no check. So when a command such as plugin/bin/jevhooks stop, or a change to a file, would stop the plugin, remove it, or edit its settings or its hook files, you are asked first. This is a plain rule on your machine: Jev, the model the plugin asks elsewhere, is not asked, and it costs nothing.
It is on from the start. 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.
- You are asked before a command or a change to a file that would stop the daemon (the plugin's one long-running process), remove the plugin, or edit its settings, a project's policy file (jevhooks.toml) or its hook files.
- A check the assistant could switch off without asking you would protect nothing, which is why this one exists.
- It is a plain rule that runs on your machine: Jev is not asked, so it costs nothing.
Say something
A jevhook is off, in shadow or on. To change this one, put this in ~/.config/jevhooks/config.toml:
[jevhooks.PreToolUse] self = "shadow"
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, that you would have been asked about the call.
2 worked cases, each an answer Jev could give, the rules that decide on it, and the screen you would see. The ones you would meet most come first.
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, calls.
plugin/bin/jevhooks stop ask
This command stops the daemon. The daemon sees that without help, so Jev is not asked: every fact that would come from Jev stays unknown, and you are asked whether to run it.
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.
❯ the hooks are slow today, restart whatever they talk to ● Bash(plugin/bin/jevhooks stop) ⎿ Running… ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Bash command Stop the jevhooks daemon ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ plugin/bin/jevhooks stop ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ │ Hook PreToolUse:Bash requires confirmation for this command: │ jevhooks: it would stop the jevhooks daemon, and a guard that can be switched off unasked is not one, so it is put to │ you settings.json to update hooks Do you want to proceed? ❯ 1. Yes 2. No Esc to cancel · Tab to amend
Band:
command: jevhooks: it would stop the jevhooks daemon, and a guard that can be switched off unasked is not one, so it is put to you · 150 ms · $0.0002 this session
The rules these cases run through
Before Write, Edit or NotebookEdit changes a file, 11 rules decide whether the new text goes in, from 17 things known about it. 3 are Jev's answers: whether a string that looks random is a real secret, whether the change breaks a rule the project wrote down, and whether it does what you said not to do. Jev gives a yes or no for every string, rule file or thing you said, and the rules read the likeliest one, never a sum. The first two rules need no answer: a key in a format the plugin knows, and a change to the plugin's own files. A broken written rule sends one file back at most 2 times in a turn, and changes at most 3 times in a session whatever the files. The rule that counts runs before the one that sends back, and past either limit a note is all that is left.
The same rules serve secret, secret-like, rules.
new text for the project's own jevhooks.toml ask
jevhooks.toml is the file where a project sets this plugin's policy. A change to it could switch a jevhook off, so you are asked whatever the new text says, and Jev is not asked. Claude Code's dialog for a file has no row for a hook's reason, so the screen shows the dialog as Claude Code draws it, with the reason listed under it.
❯ these hooks keep asking about cargo update, make them stop ● Write(.claude/jevhooks.toml) ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Create file .claude/jevhooks.toml ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ 1 [jevhooks.PreToolUse] 2 scope = "off" ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ Do you want to create jevhooks.toml? ❯ 1. Yes 2. Yes, and allow Claude to edit files in this project's .claude folder for this session 3. No Esc to cancel · Tab to amend
The call is put to you, and the dialog has no row for the reason, which is:
jevhooks: it names this project's jevhooks policy file, and a guard that can be switched off unasked is not one, so it is put to you
Band:
tool call: jevhooks: it names this project's jevhooks policy file, and a guard that can be switched off unasked is not one, so it is put to you · 150 ms · $0.0002 this session
What this site keeps about a visit, and how to refuse it, is said in one place: what is kept.