Skip to content

Recap

  • Use it for: Seeing at a glance where a session stands after you have been away from it.
  • Enable: Select packages/pi-recap/src/index.ts with pi config.
  • Controls: /recap adds the latest turn’s recap to the transcript at once.
  • Settings: PI_RECAP=0 (no automatic line), PI_RECAP_NAME=0 (leave the session name alone), PI_RECAP_DELAY_MS (default 180000), PI_RECAP_MODEL, PI_HERDR_SUMMARY=0 (no model call).
  • Requirements, cost & privacy: Pi 1.0+ TUI; recaps are saved in the session file; one small Haiku request per settled turn with a multi-line reply, sending earlier prompts, the turn’s prompt, tool calls and reply.
  • Integrations & limits: With pi-herdr, the same line is its $summary notification text, from one shared request, clipped there to 80 characters; the transcript line wraps instead of truncating.

Recap writes one line on where the session stands: what the last turn got done and, if it ended needing you, what you must decide or do. After a turn settles and the session sits idle for 3 minutes, the line is added to the transcript, drawn like Claude Code’s session recap but bold throughout (a dim bold ※ and recap:, then the text in dim bold italic, wrapped at pi-prose-width’s measure when that is loaded):

※ recap: Fixed the parser to skip empty lines; tests pass, waiting on your OK to push

Example, not a screenshot.

pi --resume and /resume list a session by its name, or by its first message when it has none. Recap names the session after the latest turn’s recap once it settles, so the list shows what each session was doing last. The name is only for that list: the status footer and pi-herdr’s pane title leave it out and show only a name you set. A name you set yourself (/name, --name) is never replaced; clear it to hand naming back. Each automatic name is recorded as a recap-name session entry.

Use Install & select and select packages/pi-recap/src/index.ts. It works on its own; pi-herdr is optional. Print mode, RPC hosts and subagents stay dormant.

As a turn settles, a small model (the first of anthropic/claude-haiku-5-5, anthropic/claude-haiku-4-5 with credentials, thinking off, 4-second cap) writes the recap from a condensed transcript: up to 5 earlier prompts as context, then the latest prompt, its tool calls and its final reply. A reply that is already one short line is used as is, with no request. Without a model, on an error, a timeout or an interrupted turn, the reply’s first sentence stands in.

The recap is a custom session entry: it stays in the scrollback, is saved with the session, and is never sent to the model. As in Claude Code, an automatic recap needs at least 3 prompts in the session and 2 more since the previous recap. It is also skipped after an interrupted run and when the recap is just the reply’s own short line, since that is already on screen. A new run, tree navigation or a new session before the delay cancels it. /recap waits for any run to finish and adds the recap at once, even a short or early one.

pi-herdr’s $summary pane token is the text notification tools show when a turn ends. With Recap loaded, pi-herdr asks for the recap over Pi’s event bus (recap:summary) and uses it, so the notification and the recap line match, from one request. Blocked dialogs still get their question from pi-herdr. Without Recap, pi-herdr writes its own last-turn summary.

pi-plan-mode asks for the same recap when a plan implemented in place finishes, and heads its finish card in the planning conversation with it. Neither plugin needs the other: without Recap the card has no heading.

Source: packages/pi-recap. The idea comes from pi-away (MIT).