March 2026
psay Agent Notifications
Initial reconnaissance started with KittenTTS and purr.
Execution moved to Piper because the Python toolchain was cleaner for local automation, scripting, and reproducible agent setup.
Three Solid Use Cases
| Use Case | Why It Matters |
|---|---|
| Long-running builds/tests | Stops terminal polling and returns focus only when work is done. |
| Agent handoff points | Flags when an agent needs human input so loops do not stall silently. |
| Risky local operations | Announces success/failure and duration for migrations, deploy scripts, and data jobs. |
Advantages
- Lower context-switch cost - fewer manual terminal checks
- Faster human response - immediate handoff when input is required
- Better operational visibility - duration and exit status are surfaced at completion time
Local Push Notifications on macOS
Yes. This is straightforward with Notification Center and does not require a cloud service.
Preferred channel is terminal-notifier when installed; fallback is osascript "display notification ...".
Hacker News Signal
- HN 38757107 - shell
preexec/precmdsnippet with thresholded completion notifications usingterminal-notifier. - HN 36491704 - lightweight
osascriptnotification helper for command completion. - HN 46794537 - recent agent workflow discussion combining Notification Center, voice output, and phone push channels.
Engineering Enhancement Implemented
scripts/psay-notify.sh is the highest-leverage first upgrade for this setup.
It wraps any command, tracks runtime, emits local notification on completion, and speaks status through Piper (or falls back to say).
# notify + speak only when runtime >= 15s
scripts/psay-notify.sh --threshold 15 --title "Agent Run" -- make test
# quiet mode: desktop notification only
scripts/psay-notify.sh --no-speak --threshold 5 -- pnpm build
Why This Enhancement Wins
It solves the real bottleneck first: delayed awareness of completion and failure.
No retraining, no custom voice dataset, no external infra. Just faster operator feedback loops with local-only primitives.