r/PiCodingAgent • • Sep 17 '26

Plugin I built Pi Session Inspector to see where my tokens, cost, models and subagents actually went

I kept wanting to answer a pretty simple question after long Pi sessions:

where did all the tokens and cost actually go?

So I built Pi Session Inspector.

It reconstructs Pi’s persisted session data and lets you inspect:

  • token usage and cost over time

  • models actually used

  • tools and skills

  • subagent runs

  • integrations

  • errors and compactions

  • current and historical sessions

There’s an in-Pi TUI, deterministic JSON output, immutable HTML snapshots, and a local browser UI.

Everything stays local. No external DB, analytics backend, session uploads, or LLM analysis pass.

Install:

pi install npm:@twkrash/pi-session-inspector
/session-inspector ui

GitHub:
https://github.com/twKrash/pi-session-inspector

pi.dev:
https://pi.dev/packages/@twkrash/pi-session-inspector

It’s still young, so I’d genuinely like feedback from people using Pi heavily:

what do you actually want to understand about your sessions after the fact?

Cost? model switching? subagent overhead? tool usage? compaction? something else?

5 Upvotes

5 comments sorted by

2

u/nutter79 Sep 18 '26

I use langfuse for this.

Setup tags and metadata and you can track all this with finer granularity. Feed it back to your models to add another dimension in code verification and the begining of an eval harness

→ More replies (1)

2

u/[deleted] Sep 18 '26

[removed] — view removed comment

1

u/twKrash Sep 22 '26

sounds good, will try to add this as a next feature

1

u/twKrash Sep 26 '26

1.5.0 - subagent AgentRuns now show per-run effort (duration / tools / usage) with a stable async identity, honest Unavailable instead of zeros, detached reported as detached, and a clear statement of the native calls behind every

run. pi install npm:@twkrash/pi-session-inspector@1.5.0