@tifan/pi-handoff

Transfer pi session context to a new session and query past sessions.

Packages

Package details

extension

Install @tifan/pi-handoff from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@tifan/pi-handoff
Package
@tifan/pi-handoff
Version
1.1.0
Published
Jun 20, 2026
Downloads
309/mo · 29/wk
Author
tifan
License
MIT
Types
extension
Size
19.4 KB
Dependencies
1 dependency · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts",
    "./src/session-query.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@tifan/pi-handoff

Start a fresh pi session from a handoff document, and query past sessions for context, decisions, or code changes.

Install

pi install npm:@tifan/pi-handoff

For local development:

pi install /absolute/path/to/pi-extensions/packages/pi-handoff

You also need a handoff skill installed and discoverable by pi. For example, install or expose Matt Pocock's handoff skill, then run /reload.

How it works

Run /handoff-session to generate a handoff document from the current session and start a clean session from it. The command asks what the next session is for, uses the installed handoff skill as the document policy, and writes the handoff under the OS temp directory.

The new session name is generated from the current conversation using pi-rename-style rules: lowercase, hyphen-separated, and under 60 characters. Naming uses openai-codex/gpt-5.4-mini when available, with a local fallback. The focus answer is used for the handoff document, not for the session name. The prompt is left in the editor for review and manual submit.

The handoff includes the previous session path when available, so the next agent can use session_query if the handoff omits a detail.

Commands

  • /handoff-session: Generate a handoff from the current session and start a renamed session from it.

Tools

  • session_query: Answer a question about a previous pi session, given the full path to its .jsonl file and the question to ask.

Behavior

  • Uses the current selected model to generate the handoff document.
  • Uses openai-codex/gpt-5.4-mini to name the new pi session when available.
  • Requires a discoverable skill named exactly handoff.
  • Writes stable, readable files under the OS temp directory, such as /tmp/pi-handoffs/pi-handoff-2026-06-01-inline-skills.md.
  • Starts a clean session with native parent-session linking.
  • Does not autosend.

Release notes

See CHANGELOG.md

License

MIT