A hook point of Claude Code

PermissionRequest

judged Before you see a permission prompt for a call jevhooks already checked, jevhooks asks Jev, a small, fast model, whether to answer yes for you.

Jev can approve a prompt for you, never refuse one. It starts in shadow, which means it only watches: the log records what Jev would have approved, and every prompt still reaches you.

Say something

The jevhooks that act here

  • Answer permission prompts for youPermissionRequest/approvestarts in shadow

    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.

Worked cases that begin here

Each is an answer Jev could give, and the screen you would see. The rules that decide it are drawn on the page of the jevhook that acts in it.

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.

❯ 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

How the rules decided it, on the page of Answer permission prompts for you

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.

❯ 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

How the rules decided it, on the page of Answer permission prompts for you

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.

❯ 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

How the rules decided it, on the page of Answer permission prompts for you

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.

❯ 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

How the rules decided it, on the page of Answer permission prompts for you

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.

❯ 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

How the rules decided it, on the page of Answer permission prompts for you

What this site keeps about a visit, and how to refuse it, is said in one place: what is kept.