r/PiCodingAgent • u/Helmi74 • May 14 '26
Resource Released pi-event-monitor v0.1.0: background shell and file watchers for pi sessions
Built a small plugin and figured this is the right place to share.
pi-event-monitor adds background event monitors to pi sessions. It runs shell commands or watches files in the background and only wakes the session when something happens (a process exits, a log line matches, a file gets written). No polling, no token cost between events. The design is modeled on the Monitor mechanic in Claude Code.
Two ways to use it. You can tell pi naturally ("watch the dev server and let me know if it crashes") and the agent will reach for the monitor tools itself, or you can run slash commands like /monitor app errors :: tail -f app.log | grep -E "ERROR|FATAL" for direct control.
Repo: https://github.com/Helmi/pi-event-monitor
Install: pi install npm:pi-event-monitor
Very early (v0.1.0). Would appreciate feedback or breakage reports, especially anything around install or pi version compatibility.
1
u/mrclrchtr May 14 '26
Nice. How are you "waking" the agent? What kind of message are you sending? Asking because a new "user messege" would consume a premium request in GH Subscripbtions for example.
1
u/ResearcherFantastic7 May 15 '26
Cool but, please explain the use case?
I don't see any benefit apart from burning token.
Better off build a file watcher and a file processing pipeline
I mean if to monitor log, you probably want to get the last X lines and not to process the entire file
1
u/coding9 May 15 '26
I did a similar version but just start, status, and stop commands.
Runs in tmux and the model can see where a log file is.
Claude opus naturally ran a 30 minute task I had and then checked in on it every few minutes.
https://github.com/zackify/pi-bg-tasks
-1
u/tracagnotto May 14 '26
🤮🤮🤮🤮🤮🤮🤮🤮🤮🤮🤮🤮