Dokumentationerreichbar
React to events with a mod (Claude Code Docs, Anthropic)
code.claude.com (externe Seite)
Wie ein Mod auf Ereignisse antwortet: Werkzeugaufrufe, Prompts und Züge beobachten, umschreiben oder beantworten, und wie mehrere Mods nebeneinander greifen.
geprüft 10.11.2026
Worauf sich diese Seite beruft, wörtlich, abgerufen am 12.10.2026:
so it can observe the event, rewrite it, or answer it itself
bestätigt 10.11.2026For a fixed command or path, use a permission rule such as
bestätigt 10.11.2026The handlers for an event form a middleware chain.
bestätigt 10.11.2026it sees the event before the others and the result after them, and it decides whether the others run at all.
bestätigt 10.11.2026When a managed hook blocks the call, no mod’s tool.call hook runs for that call.
bestätigt 10.11.2026To make a hook that blocks calls fail closed, add a .catch error handler that answers in its place.
bestätigt 10.11.2026is also an event named classic.
bestätigt 10.11.2026The hook matches the text of the command, so treat it as a reminder for Claude.
bestätigt 10.11.2026Hooks in your organization’s managed settings run before any mod’s tool.call hook.
bestätigt 10.11.2026run after the last mod calls next
bestätigt 10.11.2026In plan mode, for a call that isn’t read-only, such as a file edit, your hook can tighten the decision next(e) returns but can’t loosen it.
bestätigt 10.11.2026In a tool.check hook, e.isReadOnly is true when the tool reports the call as read-only.
bestätigt 10.11.2026A prompt.submit hook sees each prompt before the turn starts, so it can rewrite the text or add to it.
bestätigt 10.11.2026Where the built-in guard loads, a hook on these events in a mod you install doesn’t run.
bestätigt 10.11.2026