Every coding agent anotifier supports can run a command at fixed points in its lifecycle. Those hooks are all anotifier uses: setup adds one entry per event to each agent's own config file, the agent runs it, and the hook turns the event into a notification. No wrapper, no daemon, no polling. This page lists exactly what gets written where, and what happens when a hook fires. A hook runs with your user permissions, so see Claude Code hooks security for how to audit hooks and what anotifier's own hooks send.
Rather skip the manual setup? One command wires every agent you have installed to desktop toasts, phone push, and Slack, Discord or Telegram:
Updated 2026-10-12 · also see the full docs
| Agent | Config file | Finished | Needs you | Timeout |
|---|---|---|---|---|
| Claude Code | ~/.claude/settings.json | Stop | Notification | 10 s |
| Codex CLI | ~/.codex/hooks.json | Stop | PermissionRequest | 10 s |
| Cursor | ~/.cursor/hooks.json | stop | None | Not set |
| Gemini CLI | ~/.gemini/settings.json | AfterAgent | Notification | 30 s |
Codex also gets a SessionStart hook. Each agent event maps to one of three anotifier events: task_complete (default priority), needs_input (urgent), or session_start (low, and quiet by default). Claude Code's idle reminder ("Claude is waiting for your input") arrives as needs_input at default priority instead of urgent. The docs list every per-event setting.
Every hook runs the same script, src/notify.mjs from the installed package, with --source naming the agent. This is the Claude Code entry setup writes under both Stop and Notification:
{
"hooks": [
{
"type": "command",
"command": "node \"/path/to/anotifier/src/notify.mjs\" --source claude",
"timeout": 10
}
],
"_managed_by": "anotifier",
"matcher": ""
}_managed_by marker. Instead they pass --event <name>, because those agents don't include the event name in the hook's input. Codex entries also set statusMessage: "Sending notification".{ "command": "node ... --source cursor --event stop" } under hooks.stop, with version: 1.settings.json, not a separate hooks file, and takes its timeout in milliseconds (30000). Google's newer Antigravity CLI, which replaced Gemini CLI for Google AI Pro and Ultra subscribers in June 2026, reads hooks from its own files (such as ~/.gemini/config/hooks.json) with different events (PreToolUse, PostToolUse, PreInvocation, PostInvocation, Stop), so Gemini CLI hooks don't carry over. anotifier 1.4.0 and later write an anotifier group with a Stop handler there.notify.mjs and writes the event as JSON to its stdin. anotifier waits at most 500 ms for it.Stop that fires while background tasks are still running; the real completion notifies later.stop twice for one run.my-app · Claude Code, and for Claude Code the body is the last thing Claude said (or its question), read from the transcript and capped at 180 characters. Other agents send generic text such as my-app: Task complete.~/.anotifier/errors.log, never into the agent session.Current Codex releases run hooks by default; early ones needed hooks = true under [features] in ~/.codex/config.toml, so setup still sets it and migrates the older codex_hooks = true flag. Codex also runs only hooks it trusts. Each hook needs a trusted_hash under [hooks.state], keyed by the hooks file path, the event, and the entry's position, and setup writes those too.
[features]
hooks = trueCodex skips a hook without a matching hash, so if you edit one by hand it stops firing until you trust it again with /hooks in Codex. Running npx anotifier@latest setup again also rewrites the hashes. Hooks fire in the interactive Codex TUI, not in codex exec.
~/.anotifier/backups/<file>.<timestamp>.backup.notify.mjs command path, so re-running setup replaces them in place and leaves your own hooks alone.anotifier uninstall asks for confirmation, backs up each file, and removes only anotifier's entries (plus any hook arrays that end up empty) and its Codex trust hashes, and restores your Claude Code statusline (1.5.0 and later). It keeps ~/.anotifier/ with your config and backups, and leaves Codex's hooks = true flag set.Stop and Notification hooks from inside the plugin. anotifier uninstall doesn't touch those; remove the plugin from Claude Code's /plugin menu.Yes. Setup finishes with "Restart your AI tools to activate." A session that was already running may not pick up the new hooks.
anotifier's hook always exits 0 and sends every channel in parallel with short per-channel timeouts, so a dead network or a missing toast tool costs seconds at most and never fails the agent's turn. Failures are written to ~/.anotifier/errors.log.
No. It only replaces entries it recognises as its own, and backs up each file before writing.
anotifier registers only Cursor's stop event, which fires when the agent loop ends. Cursor notifications are about finished runs.
One command wires every agent you have installed: Claude Code, Codex CLI, Cursor, and Gemini CLI.
npx anotifier@latest setup