Observed since 20 Oct, 22:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Cross-platform notifications for long-running agentic CLI tools
agent-notifier sends notifications when long-running CLI/agent tasks finish.
It supports two usage styles:
agent-notifier run -- ...)Recommended:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install agent-notifier
agent-notifier setup codex
If you use multiple interactive CLIs from the current project:
agent-notifier setup all --project "$PWD"
Alternative:
pip install agent-notifier
Windows desktop toasts:
pipx install "agent-notifier[windows]"
If you already installed the base package on Windows, inject the fallback backend:
pipx inject agent-notifier win10toast
Linux desktop prerequisite:
sudo apt install libnotify-bin
If you want the latest local checkout instead of the current PyPI release:
cd /path/to/AgentPulse/packages/agent-notifier
pipx install .
From source:
python -m pip install -e .
Confirm install:
agent-notifier --help
agent-notifier setup codex
agent-notifier doctor --project "$PWD"
agent-notifier test-notifier --channel console
For safety, install does not silently edit your CLI configs.
Run agent-notifier setup codex once after install to wire Codex automatically.
Verified install status:
agent-notifier 0.1.2 was reachable and installable via pipx install agent-notifier on March 11, 2026.agent-notifier is still not found, run pipx ensurepath and start a new shell.Validated on March 2, 2026 with:
codex-cli 0.107.0AfterAgent hook)Run the helper from the repo checkout:
cd /path/to/AgentPulse/packages/agent-notifier
./examples/setup_macos.sh --trust-dir "/absolute/path/to/your/project" --open-settings
What this script does:
terminal-notifier with Homebrew when available.agent-notifier from local source checkout.~/.codex/config.toml using notify = [...].AfterAgent hook in ~/.gemini/settings.json.~/.gemini/trustedFolders.json.test-notifier and a Codex bridge smoke test.Important limitation:
Run any long command through the wrapper:
agent-notifier run -- python3 -c "import time; time.sleep(8)"
If the command fails, the notification title changes to Failed.
agent-notifier is task-level first for interactive tools.
It notifies when hook events fire (Codex/Claude/Gemini integrations), not when you exit your shell.
Codex provides a notification hook.
Recommended one-time setup after pipx install or pip install:
agent-notifier setup codex
That command:
agent-notifier-codex-hook entrypoint name by default.~/.codex/config.toml if it does not exist.notify commands.That default keeps the generated config portable across machines. If you need to pin an absolute path on one machine, pass it explicitly:
agent-notifier setup codex --hook-command "$(command -v agent-notifier-codex-hook)"
If you want to inspect the hook path manually:
BRIDGE_PATH="$(command -v agent-notifier-codex-hook)"
echo "$BRIDGE_PATH"
If you're running from a source checkout, use the included script bridge:
chmod +x examples/codex_notifier_bridge.sh
BRIDGE_PATH="$(realpath examples/codex_notifier_bridge.sh)"
echo "$BRIDGE_PATH"
Manual config form:
notify = [
"agent-notifier-codex-hook"
]
You can also use an absolute path if your Codex environment does not inherit a reliable PATH.
Codex key naming:
notify is the Codex config key (official in current Codex CLI builds).agent-notifier).Legacy filename examples/codex_notify_bridge.sh is also supported.
Optional debug logs:
export AGENT_NOTIFIER_DEBUG=1
Log location:
~/.agentnotifier/logs/codex_notifier.log
Use this exact flow if you do not use examples/setup_macos.sh or agent-notifier setup codex:
notify (not notifier) in ~/.codex/config.toml:notify = [
"agent-notifier-codex-hook"
]
If you are running directly from a source checkout without installing the package, use the script bridge path instead.
chmod +x examples/codex_notifier_bridge.sh
Restart Codex fully (fresh process), then complete one prompt.
If you still do not see a popup, enable debug and inspect hook calls:
export AGENT_NOTIFIER_DEBUG=1
tail -n 80 ~/.agentnotifier/logs/codex_notifier.log
./examples/codex_notifier_bridge.sh --channel both --verbose type=agent-turn-complete turn-id=manual-check
Expected behavior:
type=agent-turn-complete payloads and exit=0.Common causes when chime works but popup does not:
Recommended one-time setup from your project root:
agent-notifier setup claude --project "$PWD"
Preferred bridge command (installed via pipx/pip):
command -v agent-notifier-claude-hook
agent-notifier setup claude writes agent-notifier-claude-hook by default so the config stays portable.
If Claude runs in an environment with a restricted PATH, rerun setup with --hook-command "$(command -v agent-notifier-claude-hook)".
Configure hooks in .claude/settings.local.json (or user settings):
{
"hooks": {
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "agent-notifier-claude-hook --event Stop"
}
]
}
],
"SubagentStop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "agent-notifier-claude-hook --event SubagentStop"
}
]
}
]
}
}
Config files:
~/.gemini/settings.json (hooks)~/.gemini/trustedFolders.json (folder trust)Preferred bridge command (installed via pipx/pip):
command -v agent-notifier-gemini-hook
agent-notifier setup gemini writes agent-notifier-gemini-hook by default so the config stays portable.
If Gemini runs without your normal shell PATH, rerun setup with --hook-command "$(command -v agent-notifier-gemini-hook)".
Recommended one-time setup from the project root:
agent-notifier setup gemini --project "$PWD"
Configure AfterAgent hook:
{
"hooksConfig": {
"enabled": true
},
"hooks": {
"AfterAgent": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "agent-notifier-gemini-hook",
"timeout": 10000
}
]
}
]
}
}
Gemini trust requirement:
AfterAgent does not fire, confirm the current project path is trusted in ~/.gemini/trustedFolders.json.Quick check ($PROJECT_DIR is the folder where you run Gemini):
PROJECT_DIR="/absolute/path/to/your/project"
rg -n "\"$PROJECT_DIR\"|TRUST_FOLDER" ~/.gemini/trustedFolders.json
Example update:
PROJECT_DIR="/absolute/path/to/your/project"
jq --arg p "$PROJECT_DIR" '. + {($p):"TRUST_FOLDER"}' ~/.gemini/trustedFolders.json > /tmp/trustedFolders.json && mv /tmp/trustedFolders.json ~/.gemini/trustedFolders.json
Restart Gemini after changing trust settings.
Temporary hook-fire debug:
{
"type": "command",
"command": "agent-notifier-gemini-hook >> /tmp/gemini_afteragent.log 2>&1",
"timeout": 10000
}
Then run:
tail -n 20 /tmp/gemini_afteragent.log
ollama run currently has no native per-turn completion hook.ollama launch codex or ollama launch claude, configure Codex/Claude hooks above.--format json), pipe into agent-notifier ollama-hook.Example:
ollama run llama3 --format json | agent-notifier ollama-hook --name ollama --channel both
agent-notifier run -- <cmd...>
agent-notifier watch --pid <pid>
agent-notifier test-notifier
agent-notifier doctor --project <path>
agent-notifier setup codex
notify = [...] automatically.agent-notifier setup gemini --project <path>
AfterAgent and trust the project folder.agent-notifier setup claude --project <path>
Stop and SubagentStop hooks.agent-notifier setup all --project <path>
agent-notifier tail --file <path> --pattern <text>
Hook bridge commands used by integrations:
agent-notifier-codex-hookagent-notifier-gemini-hookagent-notifier-claude-hookagent-notifier codex-hook (direct mode)agent-notifier gemini-hook (direct mode)agent-notifier claude-hook (direct mode)agent-notifier ollama-hookSuppress notifications while terminal is focused (macOS):
agent-notifier gemini-hook --quiet-when-focused
Note: --quiet-when-focused is optional. If you copied older hook examples that included it by default and notifications seem missing, remove that flag.
Add sound:
agent-notifier claude-hook --chime ping
Force console output:
agent-notifier run --channel console -- your-command
Environment variables:
AGENT_NOTIFIER_TITLE_PREFIX="Agent"AGENT_NOTIFIER_CHANNELS="desktop,console"AGENT_NOTIFIER_TAIL_LINES=20AGENT_NOTIFIER_POLL_INTERVAL=1.0Optional TOML config at ~/.agentnotifier/config.toml:
title_prefix = "Agent"
channels = ["desktop"]
tail_lines = 20
poll_interval = 1.0
Environment variables override file values.
Check your tool hooks configuration. This project intentionally focuses on task-level notifications.
If notifications only appear on session exit, verify your CLI is calling codex-hook, claude-hook, or gemini-hook on task completion events.
Run the doctor first:
agent-notifier doctor --project "$PWD"
agent-notifier test-notifier --channel consoleagent-notifier test-notifier --channel both --verboseterminal-notifier first, then osascriptwin10toast fallback)notify-send (package libnotify-bin on Debian/Ubuntu)notify is configured in ~/.codex/config.toml.command -v agent-notifier-codex-hook (preferred), orchmod +x examples/codex_notifier_bridge.sh (source checkout)AGENT_NOTIFIER_DEBUG=1 and inspect ~/.agentnotifier/logs/codex_notifier.log.notifier key in Codex config; use notify.PATH, rerun setup with:
agent-notifier setup codex --hook-command "$(command -v agent-notifier-codex-hook)"Use this section to map a symptom to a concrete next action.
| Symptom | What it usually means | Verify | Fix |
|---|---|---|---|
| No notifications from Codex and log file never updates | Codex hook not wired | tail -n 20 ~/.agentnotifier/logs/codex_notifier.log after a completed turn | Use notify = [...] in ~/.codex/config.toml and restart Codex |
Codex log updates with agent-turn-complete payloads but no popup | Hook runs, desktop backend or OS UI is blocking | agent-notifier test-notifier --channel both --verbose | Enable notifications for your terminal app, disable Focus/Do Not Disturb, enable banners |
| Chime plays but no popup | Sound path works, visual notifications blocked by OS settings | Run agent-notifier test-notifier --channel both --verbose | In System Settings -> Notifications, allow alerts for terminal/iTerm and terminal-notifier (if listed) |
zsh: command not found: agent-notifier | Installed in a different Python env or not on PATH | command -v agent-notifier | Use pipx ensurepath, update PATH, or pin the hook with agent-notifier setup codex --hook-command "$(command -v agent-notifier-codex-hook)" |
Manual bridge test prints [codex] Done but Codex turns show nothing | Bridge itself is healthy; Codex config/session issue | Run manual test and compare with Codex log updates | Restart Codex fully; confirm notify = ["agent-notifier-codex-hook"] or the pinned absolute hook path |
Manual bridge command returns no output but exit code is 0 | Event did not match (often malformed payload text) | Use key-value payload form | Run: ./examples/codex_notifier_bridge.sh --channel both --verbose type=agent-turn-complete turn-id=manual-check |
Gemini AfterAgent hook never runs | Project path is untrusted in Gemini | Set hook command to write /tmp/gemini_afteragent.log and verify file updates | Add project path as TRUST_FOLDER in ~/.gemini/trustedFolders.json, restart Gemini |
Desktop backend failure mentions terminal-notifier | terminal-notifier present but failing/crashing | agent-notifier test-notifier --channel both --verbose | Reinstall/fix terminal-notifier or rely on osascript fallback |
| Linux desktop popup missing | notify-send missing/unavailable | command -v notify-send | Install libnotify-bin (Debian/Ubuntu) or use --channel console |
| Windows desktop popup missing | BurntToast/PowerShell path unavailable | agent-notifier test-notifier --channel both --verbose | Install optional extras: pip install "agent-notifier[windows]" |
macOS:
terminal-notifier (preferred, third-party) or Notification Center (osascript fallback).terminal-notifier is not an Apple-official binary; it is a widely used open-source tool.brew install terminal-notifierosascript fallback is built in.Windows:
pipx install "agent-notifier[windows]".pipx inject agent-notifier win10toast.Linux:
notify-send.sudo apt install libnotify-bin.Development checks:
python -m pip install -e ".[dev]"
ruff check .
pytest -q
python -m build
twine check dist/*
Release checklist:
docs/release_checklist.mdProject/process docs:
SECURITY.mdMIT (LICENSE)
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.5 | 14 Mar 2026 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:f4f0d3e7abf4ac9f6b2f3f7018f6a02fa3bd6801e06bd9b1a40f22b0e76b5a66