Pi
Tuneloop captures Pi coding agent sessions via an extension that hooks into Pi's session_shutdown lifecycle event and uploads transcripts automatically.
How It Works
The Tuneloop extension registers a session_shutdown handler that reads the session transcript, attaches git context, and uploads it to your Tuneloop server. The server URL and ingest token are baked into the extension at setup time — no per-machine configuration is needed.
Setup
Generate and install the extension:
npx tuneloop-plugin-setup \
--server https://tuneloop.yourcompany.com \
--token <your-ingest-token> \
--harness pi \
--install
The --install flag generates the extension with your credentials embedded and copies it to ~/.pi/agent/extensions/. Pi auto-loads extensions from this directory at startup — no additional configuration needed.
To test without installing:
pi -e ./tuneloop-pi-extension.ts
After setup, every Pi session is automatically uploaded when it ends.
Backfill
To upload existing sessions that predate the extension installation:
npx tuneloop-plugin-setup \
--server https://tuneloop.yourcompany.com \
--token <your-ingest-token> \
--harness pi \
--backfill
Options:
--since 2025-01-01— only sessions after this date--limit 100— cap the number of sessions--dry-run— preview what would be uploaded
Re-running backfill is safe — the server deduplicates on content hash.
Project-level extension
You can also place the extension in .pi/extensions/ in a repository. Since the extension contains your ingest token, the repo must be private. Every developer who clones the repo gets automatic session capture.
Transcript Location
Pi writes session transcripts to ~/.pi/agent/sessions/. Branch conversations are stored in single files, with leaf sessions named using a base~leaf convention.