Skip to main content

pi-reporter

Puts every Pi session on the dashboard, observe-only. It is a Pi extension that runs inside each pi process (Pi 1.6.1 or later), as the Claude Code plugin runs inside Claude Code, and posts one report per session with codex-reporter's transport, machine identity, redaction and git readers (imported from codex-reporter/src/). It calls no Pi action, registers no tool, command or shortcut, writes nothing into the session, and the dashboard cannot answer its sessions or send them a message or command.

scripts/install.ts --pi writes one file, ~/.pi/agent/extensions/sitrep-reporter.ts (under $PI_CODING_AGENT_DIR when that is set), which loads src/index.ts from this clone, and the settings file ~/.sitrep/pi-reporter.env. No Pi setting is read or written. Sessions started afterwards report; an open one reports after /reload in it. git pull in the clone updates every session at its next start or /reload. scripts/uninstall.ts --pi removes the file.

What it reports​

Pi's rules are cited in src/index.ts (pi 1.6.1).

ReportFrom Pi
provider, reporter.namepi, pi-reporter; engineVersion is Pi's version
which sessionsthe session of each pi process from its first user or assistant message, Pi's own test for writing a session file: a pi opened and quit sends nothing
reporter.hostSurfaceterminal (the TUI), headless (pi -p, --mode json), rpc
session.id, namePi's session id; Pi's session name, else the first prompt, redacted and cut, else the folder
statusrunning while Pi runs (from a run's start to its settling) or compacts; waiting on permission while a confirm dialog waits in the terminal, on input while a select, input or editor dialog does, the dialog's first line as the note; else idle. done when Pi quits or switches session (new, resume, fork), with that reason
model, effort, contextPi's model, thinking level and context fill, as its footer shows them
usageByModelevery entry's tokens, every branch, as Pi's /session totals them: a response under the model that answered, compactions and branch summaries under the model in effect, a tool's own usage under unknown (unpriced). Long above 100K prompt tokens for Claude, 272K otherwise
loop, toolOpen, toolFailurestool calls and model requests from every entry; the newest call; a call open; failed calls in a row
blowoutscompactions at Pi's threshold or on overflow seen by this process; unknown for a session that compacted before
git, filesread in Pi's folder every 10 s, files counted from the commit at the extension's start
eventsfile edits, compactions, a dialog's wait, a run that ended in error (Pi's first error line)
rows (the record)a turn per Pi run, a request per model response, a call per tool call with its outcome and exit code; text only at full capture, redacted on the machine
respondoff, limit observe-only: the panel reads "Answer in pi"
everything elseunknown or empty: cost (the server prices the usage), plan windows, plan, skills, agents

Configuration​

~/.sitrep/pi-reporter.env, read with Node's own env-file parser, never put into the environment Pi gives its commands:

  • PI_REPORTER_SERVER_URL: the dashboard server (default http://127.0.0.1:7487)
  • PI_REPORTER_TOKEN: the admin secret
  • PI_REPORTER_CAPTURE: off, trace (rows without text, the default) or full (rows with their text); any other value reports nothing
  • PI_REPORTER_ACTIVITY_FEED: on unless off, false or 0

Reports go over node:http, never through Pi's proxy settings. Problems go to ~/.sitrep/pi-reporter.log, each line starting with its UTC time; nothing is written to Pi's terminal.

Limits​

  • Not seen: sessions started with --no-extensions, by an SDK host with its own resource loader, or on a Pi below 1.6.1 (the log says so).
  • A question built on a custom component shows no Needs you, as Pi's own terminal status does not; a dialog opened inside one is not seen either.
  • A /reload mid-run leaves that turn without an end; a dialog already open at a /reload is seen only at its end; the files' base starts again at HEAD.
  • A Pi killed without its shutdown (SIGKILL, a crash) leaves its card to the server's 75 s silence timer. The last report waits at most 1 s; rows it cannot carry in that time are lost.
  • A fork's first report carries the usage copied from its parent; the server books nothing twice.