@dev-sergeev/pi-recap
One-line session recap on demand or after you have been away.
Package details
Install @dev-sergeev/pi-recap from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@dev-sergeev/pi-recap- Package
@dev-sergeev/pi-recap- Version
0.4.8- Published
- Oct 21, 2026
- Downloads
- 391/mo · 5/wk
- Author
- dev-sergeev
- License
- MIT
- Types
- extension
- Size
- 67.3 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"image": "https://raw.githubusercontent.com/dev-sergeev/pi-recap/HEAD/assets/recap-widget.webp",
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@dev-sergeev/pi-recap
Re-enter a Pi session without rereading the transcript.
This standalone fork of Tifan's @tifan/pi-recap 0.4.8 shows a one-line, goal-first recap above the editor. It recalls why you opened the session, the current state, important decisions, and the likely next action. It targets Pi (@earendil-works packages), not Oh My Pi.

Install
Install from npm:
pi install npm:@dev-sergeev/pi-recap
Alternatively, install directly from GitHub:
pi install git:github.com/dev-sergeev/pi-recap
Requires Pi 0.87.1 or newer and Node.js 22.19.0 or newer. Do not enable both this fork and the original recap extension: both register /recap, and side-by-side installation is not supported.
How it works
/recapgenerates a fresh recap and shows it above the editor.- After the agent settles, the extension waits 2 minutes. If the session remains idle, it generates one automatic recap.
- Each generation has a 60-second timeout.
- New input cancels the pending automatic recap. A new agent run or session shutdown also cancels active generation.
- On session resume, a current saved recap is restored where supported by Pi; a stale or missing recap is regenerated.
- Sending a non-
/recapmessage clears the displayed recap.
Recaps use Pi's current session context, follow the active branch, and respect compaction, including safeguards after failed compaction. They do not scrape the full session file or terminal history. The latest recap is stored outside the LLM conversation context.
Commands
| Command | Action |
|---|---|
/recap |
Generate and show a fresh recap. |
/recap status |
Show model selection, active model, recap freshness, and visibility. |
/recap config |
Choose an explicit recap model or return to session model inheritance. |
/recap help |
List the recap commands. |
A recap is current when it still matches the latest session state; otherwise it is stale.
Model selection
Without an explicit recap model, each new recap request uses the current session model. Changing the model for the main Pi conversation changes the next recap request too; there is no fixed default recap model.
Use /recap config to select an explicit recap model. This selection takes precedence over the session model until you clear it. If the selected model becomes unavailable or lacks authentication, the extension reports an error rather than substituting another model.
Choose Use default — Current session model in the picker to remove the explicit preference immediately. The next request inherits the session model without reloading Pi. A model or preference change does not restart a recap already submitted: that request retains its selected model.
The picker saves the fork's preference in:
$PI_CODING_AGENT_DIR/extensions/dev-sergeev-pi-recap.json
You can also edit this file manually, using a provider/model-id available in your Pi installation:
{
"model": "provider/model-id"
}
The fork never reads, migrates, or deletes the original extension's extensions/pi-recap.json. Use the picker for changes that should take effect immediately.
Development
Use Bun for dependency management and Node.js 24 or newer for the development checks:
bun install
bun run test
bun run typecheck
bun run lint
bun run format:check
bun run format formats the repository. Tests use Node's --experimental-strip-types runner. Pi loads src/index.ts directly; there is no build step. The npm package includes TypeScript source, assets, license, README, and changelog, but excludes *.test.ts files.
Releases
See CHANGELOG.md for release notes. The first standalone fork release is 0.4.8, based on upstream @tifan/pi-recap 0.4.8. Future changes are recorded through Changesets; the older upstream release history is retained in the changelog.
CI checks formatting, tests, lint, and types. The Prepare release workflow runs only through workflow_dispatch and creates a Changesets version pull request; it does not publish npm packages. No push-triggered workflow publishes this package.
Public pushes and npm publication require explicit authorization. bun run release publishes the current package version through Changesets without incrementing it. Local first publication uses NPM_CONFIG_PROVENANCE=false bun run release because GitHub OIDC provenance is unavailable locally. For later provenance-backed releases, configure and authorize a trusted-publishing workflow separately.
Credits and license
Based on Tifan Dwi Avianto's pi-extensions, retaining the upstream 0.4.8 fixes and MIT copyright. Fork maintained by dev-sergeev.
MIT. Report fork issues at dev-sergeev/pi-recap.