piagent_
← ~/map

$ cat ~/map/pi-notify.md

pi-notify

Focus-aware notifications and sounds for pi: quiet while you watch the terminal, alerting the moment you switch away.

extensions✓ Nov 1

Facts

repository
github.com/ethantang1024/pi-notify ↗
GitHub Stars
★ 0
Forks
0
license
MIT
npm / mo
—
last push
Oct 31, 2026

install

pi install https://github.com/ethantang1024/pi-notify.git, then configure the notify block in ~/.pi/agent/settings.json or .pi/settings.json (focusAware, onComplete, onError, onQuestion, sound, volume, minWorkMs, minAwayMs); run /notify check for the detected backend and focus state, /notify test for an end-to-end test notification.

## TL;DR

A pi extension that keeps quiet while the terminal holds focus and delivers native desktop notifications and sounds the moment you switch away: task completion, tool errors, and input requests reach Windows balloon tips, Linux notify-send, or macOS osascript, degrading to OSC 777 / OSC 99 and the terminal bell on headless and SSH sessions.

## Key points

## FAQ

Q Does it stay silent while I am working in the terminal?

Yes — with focusAware enabled, completion and question notifications trigger only when the terminal loses focus. Errors still come through by default (alwaysNotifyOnError).

Q What happens over SSH or in a headless session?

Delivery degrades to OSC 777 / OSC 99 escape sequences and the ASCII bell instead of native OS notifications.

Q Does it work inside tmux?

Yes, after appending set -g focus-events on to ~/.tmux.conf so focus events pass through; Alacritty users get a graceful fallback to away-duration heuristics.

Q How do I verify delivery works?

/notify check prints the detected backend and focus state; /notify test sends a test notification and plays the alert sound immediately.

Q Which events trigger a notification?

Run completion (agent_settled), unexpected tool errors (tool_result isError), and input requests (ui_prompt_start).

## References

## Related entries

## Guides

Last updated: Oct 31, 2026