A powerful notification extension for the Pi Coding Agent.
Pi Notify++ sends native terminal notifications when the agent completes a turn, providing rich, at-a-glance context about what just happened without needing to switch tabs.
- Smart Status: Instantly see if the turn succeeded (β
), failed (β), or was truncated due to length (
β οΈ ). - Time-Aware: Displays duration only for long-running tasks (>1m), keeping short interactions clean.
- Contextual Metadata:
- Tool Stats: See how many tools were used (
5 ops). - Last Action: Visual indicators for commands (
π» npm install) vs file edits (π server.ts). - Error Tracking: Identifies which tool failed directly in the notification.
- Tool Stats: See how many tools were used (
- Optimized Layout: Critical stats are placed at the start of the message body to ensure they are never truncated by the OS notification center.
- Clean Aesthetics: Automatically formats model names (e.g.,
Gemini 3 Pro) and durations (1h 5m) for maximum readability.
- Pi Coding Agent
- A terminal that supports OSC 777 notifications:
- Ghostty (Recommended)
- iTerm2
- rxvt-unicode
- Kitty (with configuration)
Clone this repository directly into your Pi extensions directory:
# Create the directory if it doesn't exist
mkdir -p ~/.pi/agent/extensions
# Clone the repo
git clone https://github.com/YOUR_USERNAME/pi-notify-pp.git ~/.pi/agent/extensions/pi-notify-ppPi will automatically discover index.ts in the pi-notify-pp folder.
- Download
index.ts. - Place it in
~/.pi/agent/extensions/pi-notify-pp/index.ts(or simply as~/.pi/agent/extensions/pi-notify.tsfor a single-file install).
Just run pi as usual. When the agent finishes processing and is waiting for your input, you will receive a system notification.
The notification is packed with info, optimized for at-a-glance reading:
1. The Title
β
(3m) Pi: Gemini 3 Pro
- Status Icon:
- β Success: Everything ran smoothly.
- β Error: A tool execution failed (e.g., build error).
β οΈ Truncated: The model's response was cut off (token limit reached).
- Duration: Shows how long the turn took, but only if it exceeds 1 minute. Short turns remain minimal.
- Model Name: Automatically cleaned up to be short and readable (e.g.,
Gemini 3 Pro H).
2. The Body
[12 ops Β· π» npm test Β· bash β] The tests failed...
-
Metadata Block (Always at the start):
- Tool Count: Number of tool calls (
12 ops). - Last Action: Visual icon for the final operation:
- π»
Command: Terminal execution. - π
File: File write or edit.
- π»
- Error Details: If a tool fails, it explicitly names it (e.g.,
bash β). - Session Name: Your named session (e.g.,
[fixing-bug]).
- Tool Count: Number of tool calls (
-
Snippet: A preview of the agent's final response.
-
Clicking the notification brings the terminal to the foreground.
The extension is a simple TypeScript file. Feel free to edit index.ts to change icons, timeout thresholds, or formatting preferences.
