Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.242 Home All releases olderv2.1.241 v2.1.243newer
Claude Code v2.1.242

Each hook event enforces what a plugin is allowed to change

Not switched on
Useful3 Signal4
Plugins

Plugin hooks are limited in what they may rewrite, and cannot take over question prompts.

What

Return values from a hook are validated per event rather than trusted. A subagent spawn hook may only rewrite the model. A pre-tool-use hook must keep the tool envelope's keys intact. A prompt submission hook may return replacement text or a drop string. The question component is refused as a render target outright, because its answer authorises an action; a plugin can add context around it with a notice instead.

Details
  • The full event list a module may hook is PreToolUse, tool.call, tool.describe, ui.render, ui.resolve, agent.spawn, prompt.submit, prompt.section, turn.start, turn.step, turn.complete and engine.create.
  • Validation is structural to the hooks engine, not tied to a separate flag.
Evidence

is drawn by the engine alone; its answer authorises an action. A plugin adds context with $.ui.notice

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.242 →