← Catalog

@wengine-ai/pi-session-handoff

Hand a self-contained task to another local pi session (GUI or TUI) — recipient keeps its own project, model and permissions; busy targets queue instead of being interrupted.

Extension

Install

Install with PiG

pig install npm:@wengine-ai/pi-session-handoff

Install with Pi

pi install npm:@wengine-ai/pi-session-handoff
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.mjs"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.4 (README.md). PiG does not review it.

@wengine-ai/pi-session-handoff

Hand a self-contained task to another local pi session — from the terminal, from the desktop app, or between the two.

The recipient keeps its own project, model and permissions; the sender never gets to drive another project's tools or files. If the target session is busy, the message is queued behind its current turn instead of interrupting it.

Install

pi install npm:@wengine-ai/pi-session-handoff

The npm: prefix is required. Without it, pi install @wengine-ai/pi-session-handoff is interpreted as a local path and fails with Path does not exist.

Both sides need this plugin. A session can only receive a handoff if it is running with the plugin loaded. In the desktop app it ships built in; in the terminal you install it as above.

After installing, restart pi (or run /reload) so the tool registers.

What it does

CapabilityDetail
Deliver to any local sessionGUI ↔ GUI, TUI ↔ TUI, TUI ↔ GUI
Recipient autonomyKeeps its own project, model, permissions and memory scope
Busy targetQueued behind the current turn; never interrupts
IdempotencyA stable idempotencyKey prevents double delivery on retry
DisambiguationDuplicate session names return candidates instead of guessing
Probe safetyLiveness probes use a dedicated route and do not consume queued work

In the desktop app it can also reach a session that is currently disconnected, because the main process reconnects it before delivering.

Usage

The model calls it as a tool. Typical flow:

  1. action: "list" — discover candidate sessions (optionally scoped by projectPath)
  2. action: "send" — deliver a self-contained message to one exact sessionKey

A handoff message must stand on its own: the recipient never saw the sending conversation. Include the findings, evidence, file paths and acceptance criteria.

Notes

  • A queued result means accepted in memory, not completed. Closing or reloading the receiver before it starts can cancel pending work.
  • If a send times out or returns something unexpected, inspect before retrying — pass the same idempotencyKey so a retry cannot deliver twice.
  • Sessions are addressed by their own identity; a session cannot hand off to itself.

How it works

Two files, zero runtime dependencies:

  • index.mjs — registers the session_handoff tool; in the desktop app it also uses the reserved desktop-handoff channel to ask the main process for candidates and to reach disconnected sessions.
  • transport.mjs — per-session descriptor registry (under the pi agent dir) plus a loopback HTTP endpoint for delivery, with instance ids, a /ping probe and receiver-side idempotency.

License

Apache-2.0