pi-fork-session-herdr
v0.1.0
Published
Fork the current Pi session into a new Herdr pane without interrupting the running session.
Maintainers
Readme
pi-fork-session-herdr
A Pi extension that forks the current persisted session into a new Herdr pane without replacing or stopping the Pi session in the original pane.
This is useful while the current agent is still running: invoke the command, continue the original task in its pane, and start an independent conversation from the saved session state in the new pane.
Requirements
- Pi interactive mode
- Pi running inside Herdr
- A persisted Pi session (not
--no-session) herdrandpiavailable onPATH
Install
From GitHub:
pi install git:github.com/wujunchuan/pi-fork-session-herdrFor local development:
pi install /Users/john/Project/github/pi-fork-session-herdrThen reload Pi:
/reloadCommands
/fork-session-herdr [right|down] [--focus|--no-focus]
/fork-herdr [right|down] [--focus|--no-focus]Examples:
/fork-session-herdr
/fork-session-herdr down
/fork-session-herdr right --no-focus
/fork-herdr --no-focusDefaults are right and --focus.
How it works
The extension:
- Reads the current persisted session file from Pi.
- Splits the current Herdr pane.
- Starts
pi --fork <session-file>in the new pane.
It intentionally does not call Pi's ctx.fork(), because that would replace the session in the original pane and abort its running agent.
The new Pi process sees the session state that had already been saved when the command ran. An assistant response that is still streaming may therefore be absent or incomplete in the fork.
Development
npm install
npm run checkLicense
MIT
