hark is a native Codex plugin. Codex discovers hooks/hooks.json, exposes the
installed directory as ${PLUGIN_ROOT}, and runs one dependency-free command
for each mapped event.
codex plugin marketplace add sdv0001/hark
codex plugin add hark@harkRestart Codex after installation. Open /hooks to inspect the four commands
and approve them if Codex asks you to trust hooks from the new plugin.
The minimum supported version is Codex 0.147. Earlier versions used a different integration path and are intentionally unsupported.
If you previously installed hark through Codex's global notifier, remove the
top-level hark notify = [...] entry from ~/.codex/config.toml. Do not remove
another tool's notifier. The native plugin does not need or read this setting.
There is no migration command: removing one obsolete line is safer than letting a sound plugin rewrite a user's global Codex configuration.
| Codex event | Role |
|---|---|
Stop |
done |
PermissionRequest |
attention |
SubagentStop |
subagent |
SessionEnd |
bye |
| — | error remains silent |
Codex 0.147 has no supported hook in this contract that reliably means “the
agent failed”. hark leaves error silent rather than attaching it to an event
that only approximately means failure.
On macOS and Linux, each hook starts scripts/hark.sh in the background. On
Windows, Codex's documented commandWindows override starts
scripts/hark.ps1 in a hidden PowerShell process. Both paths resolve the same
roles, presets, and shared config without parsing the hook payload.
- Run
codex plugin listand confirmhark@harkis installed and enabled. - Open
/hooksand confirm the four hark hooks are present and trusted. - Run
sh scripts/hark.sh testfrom a checkout to verify sound resolution, or setHARK_PRESET=offtemporarily if you only need to test hook loading.
If direct playback works but hooks do not appear, upgrade to Codex 0.147 or later and refresh the marketplace snapshot before reinstalling the plugin.