r/PiCodingAgent • u/haze4202 • May 25 '26
Resource I built Pi Insights, find where you waste tokens and time in your Pi harness

I use Pi as my coding harness for basically all my coding now. After a few months I had 400+ sessions and no idea what was actually working. Was I using the right model for each task? Was I repeating the same mistakes? idk
I thought claude code's /insights was cool, so I built it with a clean room implementation, but it wasn't good enough. Claude wants you to burn as many tokens as possible, I have no such incentive so I added tokens wastage section, created it to be like a retrospective report that compares this week to last week.


It also tells you what to stop doing. Most tools just suggest new things to try. This one looks at your actual sessions and says "you used Opus 47 times for single-file edits, that cost you $14 more than Sonnet would have" or "you retry this pattern 3x per session on average, here's why it keeps failing."

How it works if your interested, here is a tldr; it extracts deterministic stats from each session (tokens, tools, git ops, errors), then runs a short LLM call per session to classify the goal/outcome/friction. Then it aggregates everything with exponential decay (recent sessions matter more) and runs 8 focused prompts in parallel to generate different report sections. The whole thing caches aggressively, so re-runs are fast.
To prevent redundant changes it also checks what you already have installed (skills, extensions, AGENTS.md) so it won't suggest things you already use in your harness
Install:
pi install npm:@observal/pi-insights
Run: /pi-insights
Opens an HTML report in your browser. No server, no signup, runs locally.
Source: https://github.com/BlazeUp-AI/pi-insights (Star and throw some contributions this way if your interested, or fork and customize it to your hearts desires)
I built this as part of a bigger project (Observal, agent observability platform) but this extension is fully standalone. Would love feedback on what else would be useful to surface from session data.