hooks/

August 12, 2026 · View on GitHub

English | 中文

The hooks subsystem lets users extend the agent at lifecycle points the way Claude Code and Codex do — by pointing a bridge plugin at an existing hooks.json (or settings) so those external shell hooks run faithfully. The canonical extension surface itself is the harness's typed interception points (the interception extension-points Agent Note); a "native hook" is just an ordinary Cordis plugin on those extension points. These packages are the bridges that translate the external shell-hook protocol onto that same surface, plus the shared wire-protocol library they build on.

PackageRoleShape
hook-protocol/Shared shell-hook protocol librarylibrary
hooks-claude-code/Claude Code hook bridgeplugin
hooks-codex/Codex hook bridgeplugin

The shared library owns common protocol behavior; each bridge owns its dialect-specific event mapping. The child READMEs document those contracts.