A hook point of Claude Code

SubagentStop

judged When a subagent finishes, jevhooks checks its report before the assistant that started it reads it.

The report is set against the task the subagent was given and the subagent's own tool calls, and Jev, a small, fast model the plugin asks, answers the questions. A subagent that reports “Renamed everywhere, all good.” after four changes and no test is sent back to its work once, and told why. Both checks below start in shadow: Jev is asked, the log keeps what would have been done, and no subagent is sent back until you switch one on.

Say something

The jevhooks that act here

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 subagent that reports “Renamed everywhere, all good.” after four changes and no test send it back

A subagent's end is an end too, judged by the same rules with its own calls counted: four changes to files, and no check passed after the last. Jev is 95% sure its report claims the work is done. The subagent is sent back before its report reaches the assistant that started it.

❯ rename Client to HttpClient everywhere

● Update(src/http.rs)
  ⎿  Updated src/http.rs with 6 additions and 6 removals

● Renamed everywhere, all good.

✻ Working…
subagent end: Jev: the last message claims the work is done (95%), and no check has passed since the last of 4       [-]
changes · 150 ms · $0.0002 this session

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

The subagent's end is sent back, and it reads:

jevhooks: The last message says the work is done, but this subagent's work made 4 changes to files and no test, build, lint or type-check has passed since the last one (Jev: 95% that done is claimed). Run the check that covers the change, or say plainly that it is unverified. This is said once.

How the rules decided it, on the page of Send back “done” when nothing was checked

a subagent that ends with no summary, when your rules ask for one send it back

A subagent's end is checked against the same rule. Its report is only “The check passes.”, Jev is 91% sure that breaks the rule, and the subagent is sent back with your rule as the reason.

❯ rename Client to HttpClient everywhere

● Bash(cargo check)
  ⎿  Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.31s

● The check passes.

✻ Working…
subagent end: Jev: this end breaks a rule of yours (91%): "End with a one-line summary of what changed." · 150 ms ·  [-]
$0.0002 this session

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

The subagent's end is sent back, and it reads:

jevhooks: The end of this subagent's work looks to break a rule for how one ends: the user's own rule "End with a one-line summary of what changed." (Jev: 91%). Put it right before ending, or say plainly why it does not apply. This is said once for this end.

How the rules decided it, on the page of Send a turn back when it ends against your rules

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