Pi extension for session handoff workflows.
/handoffcommand- summarizes current thread into a structured handoff summary
- includes repository state when run inside a git repo (
git status, diff stats, recent commits) - trims the middle of very long conversations before generation while preserving early setup and latest turns
- creates a new session with parent linkage
- immediately submits the handoff summary in the new session, which triggers the assistant to respond
- does not open an edit/confirmation step
session_querytool- query facts from prior
.jsonlsession files - path guardrails for sessions directory
- query facts from prior
- Clone this repo.
- Copy
index.tsto either:~/.pi/agent/extensions/handoff/index.ts(global).pi/extensions/handoff/index.ts(project-local)
- Restart pi or run
/reload.
- In a session:
/handoffor/handoff <goal> - In new thread, when needed: call
session_querywith parent session path.
- Requires model access for generation/query (
@mariozechner/pi-aicomplete API). - Updated for the current pi coding agent extension API (
@mariozechner/pi-coding-agent). - Uses
modelRegistry.getApiKeyAndHeaders()for generation/query auth. - Generation failures are reported separately from user cancellation.
- Run
/reload. - Run
/handoff. - Confirm it does not prompt for a goal, does not open an editor, creates/switches to a new session, and auto-submits the handoff summary.