NachschlagenQuellenregister

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 itselfbestätigt 10.11.2026
  • For a fixed command or path, use a permission rule such asbestätigt 10.11.2026
  • The handlers for an event form a middleware chain.bestätigt 10.11.2026
  • it sees the event before the others and the result after them, and it decides whether the others run at all.bestätigt 10.11.2026
  • When a managed hook blocks the call, no mod’s tool.call hook runs for that call.bestätigt 10.11.2026
  • To make a hook that blocks calls fail closed, add a .catch error handler that answers in its place.bestätigt 10.11.2026
  • is also an event named classic.bestätigt 10.11.2026
  • The hook matches the text of the command, so treat it as a reminder for Claude.bestätigt 10.11.2026
  • Hooks in your organization’s managed settings run before any mod’s tool.call hook.bestätigt 10.11.2026
  • run after the last mod calls nextbestätigt 10.11.2026
  • In 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.2026
  • In a tool.check hook, e.isReadOnly is true when the tool reports the call as read-only.bestätigt 10.11.2026
  • A prompt.submit hook sees each prompt before the turn starts, so it can rewrite the text or add to it.bestätigt 10.11.2026
  • Where the built-in guard loads, a hook on these events in a mod you install doesn’t run.bestätigt 10.11.2026

16 Rechte und Sandbox18 Hooks und Mods31 Der Harness

Alle Quellen

↑↓ auswählenEnter öffnenDie Suche läuft im Browser. Nichts wird übertragen.