packages/hooks

September 4, 2026 · View on GitHub

English | 中文

Summary

The hooks group lets agent runs use the shell hooks you already wrote for Claude Code or Codex: mount the matching bridge, point it at your existing hooks.json, and those hooks fire at the corresponding moments in agent runs — when a session starts, when a prompt is submitted, before and after a tool runs, or when a run is about to stop. Hooks can block a prompt or tool call with a message the model sees, attach extra context to the conversation, or force the run to continue. Choose this group when existing hook configs should keep working without being rewritten as native plugins; each bridge covers the command-hook subset its reference tool documents. hook-protocol is the shared hook engine both bridges use, so the two dialects behave the same way where their protocols agree.

Table of Contents


Packages

PackageRoleShape
hook-protocolShared hook engine both bridges use; never configured directlylibrary
hooks-claude-codeRun your existing Claude Code hooks.json hooks during agent runsplugin
hooks-codexRun your existing Codex hooks.json hooks during agent runsplugin


Dev Note

Working context for maintainers — click to expand

None.