A jevhook

Answer permission prompts for you

This is for anyone tired of pressing yes so that cargo fmt may run. When Claude Code is about to ask your permission for a tool call that is plainly ordinary work, or one you asked for in so many words, a small model called Jev answers yes for you and you never see the prompt. It can only approve: any prompt it is not sure of reaches you exactly as before.

It starts in shadow: it writes down what it would have done and changes nothing, until you switch it on. It acts at PermissionRequest.

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.

Exactly what it does

  • It approves a prompt only when Jev gives 15% at most that the call cannot be undone, under 50% that the call's own text argues for its approval, and one of two things more: Jev is 85% sure you already asked for exactly this, or 65% sure it is plainly ordinary work with that answer 30 points clear of its next answer.
  • It never approves a call that the jevhooks checking a call before its tool runs would have refused or asked you about, those still in shadow included, nor a call they never checked.

Its switch

  • At PermissionRequest it is PermissionRequest/approvestarts in shadow
    Say something

A jevhook is off, in shadow or on. To change this one, put this in ~/.config/jevhooks/config.toml:

[jevhooks.PermissionRequest]
approve = "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 prompts would have been approved.

5 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, and the 2 at the edges last: a switch that is off, a cap that is spent, an answer Jev is not sure of.

A permission prompt, before you see it

The rules these cases run through

7 rules decide whether a permission prompt is approved for you or left for you to answer. Neither is a refusal. They test 6 things known about the call, 4 of them from Jev. They are whether this is switched on, what the checks before the tool runs made of the call, and Jev's four answers. The first five rules leave the prompt to you, and only a call that gets past them can be approved.

a prompt for cargo fmt, switched on approve it

The checks that looked at the command first found nothing against it. Jev is 95% sure it is plainly ordinary work, far clear of its next answer, and sure it can be undone. The prompt is answered yes for you, and you never see it.

Jev, in one requestapproveonits own rulesclearargues2%can be undone97%already granted10%ordinary work95%= no= object= unjudged= yes= no= yes= yesapproving is off → leave itits own rules object → leave itnever judged → leave itits text argues → leave itnot surely undoable → leave itgranted before → approve itplainly ordinary work → approve it1

Open this drawing at its own size

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.

❯ tidy up the formatting before I review

● Bash(cargo fmt)
  ⎿  (No output)

✻ Working…
permission: Jev: plainly ordinary work (95%, 92 points clear), and it can be undone; approved · 150 ms · $0.0002     [-]
this session

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏸ manual mode on · esc to interrupt

The prompt is answered for the user:

allow
a prompt for git push --force leave it

The checks that looked at the command first would already have asked you about it. That settles it before Jev is asked anything: the prompt is yours to answer, and Jev's four answers stay unknown.

Jev, in one requestapproveonits own rulesobjectarguescan be undonealready grantedordinary work= no= object= unjudged= yes= no= yes= yesapproving is off → leave itits own rules object → leave it1never judged → leave itits text argues → leave itnot surely undoable → leave itgranted before → approve itplainly ordinary work → approve it

Open this drawing at its own size

❯ squash the last three commits and update the branch

● Bash(git push --force)
  ⎿  Running…

✻ Working…
permission: jevhooks: its own rules would put this call to you or refuse it, so the prompt is yours · 150 ms ·       [-]
$0.0002 this session

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏸ manual mode on · esc to interrupt
a prompt for a delete you asked for by name leave it

You typed “delete notes/old.md”, and Jev is sure you asked for exactly this. But Jev puts it at 60% that the delete cannot be undone, and nothing that may not be undone is approved for you.

Jev, in one requestapproveonits own rulesclearargues2%can be undone40%already granted95%ordinary work30%= no= object= unjudged= yes= no= yes= yesapproving is off → leave itits own rules object → leave itnever judged → leave itits text argues → leave itnot surely undoable → leave it1granted before → approve itplainly ordinary work → approve it

Open this drawing at its own size

❯ delete notes/old.md

● Bash(rm notes/old.md)
  ⎿  Running…

✻ Working…
permission: Jev: not sure this can be undone (60% that it cannot); the prompt is yours · 150 ms · $0.0002 this       [-]
session

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏸ manual mode on · esc to interrupt
a prompt for a call Jev could not be asked about leave it

When the command was first checked, Jev did not answer in time, so nobody checked it. A call nobody checked is not a call that passed: the prompt is yours to answer, and Jev is not asked now either.

Jev, in one requestapproveonits own rulesunjudgedarguescan be undonealready grantedordinary work= no= object= unjudged= yes= no= yes= yesapproving is off → leave itits own rules object → leave itnever judged → leave it1its text argues → leave itnot surely undoable → leave itgranted before → approve itplainly ordinary work → approve it

Open this drawing at its own size

❯ update the lockfile and see if it still builds

● Bash(cargo update && cargo build)
  ⎿  Running…

✻ Working…
permission: jevhooks: its own rules did not judge this call, so the prompt is yours · 150 ms · $0.0002 this session  [-]

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏸ manual mode on · esc to interrupt
any prompt, before you switch this on leave it

Until you switch it on, Jev is still asked, and the log records which prompts it would have approved. Nothing else changes: every prompt reaches you as before. The screen shows this for cargo fmt, and the same holds for any other call.

Jev, in one requestapproveoffits own rulesclearargues2%can be undone97%already granted10%ordinary work95%= no= object= unjudged= yes= no= yes= yesapproving is off → leave it1its own rules object → leave itnever judged → leave itits text argues → leave itnot surely undoable → leave itgranted before → approve itplainly ordinary work → approve it

Open this drawing at its own size

❯ tidy up the formatting before I review

● Bash(cargo fmt)
  ⎿  Running…

✻ Working…
permission: answering permission prompts is switched off ([jevhooks.PermissionRequest] approve in the config file) · [-]
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.