pi-fork-new

Pi extension for starting a fresh top-level branch in the current conversation session

Packages

Package details

extension

Install pi-fork-new from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-fork-new
Package
pi-fork-new
Version
0.1.0
Published
Jul 31, 2026
Downloads
184/mo · 14/wk
Author
maxedapps
License
MIT
Types
extension
Size
13.3 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

Pi /fork-new

A Pi extension that starts a fresh top-level conversation branch while keeping the current session ID and session file.

Install

Install the package directly from GitHub:

pi install https://github.com/maxedapps/pi-fork-new

To install through SSH instead:

pi install git:git@github.com:maxedapps/pi-fork-new

Restart Pi after installation, or run /reload in an existing Pi session. The /fork-new command is then available globally.

Use

Run:

/fork-new

Choose how to seed the new branch:

  • Use latest assistant response — copies only visible text from the latest completed assistant response on the active branch. It excludes thinking, tool calls, tool results, incomplete responses, and inactive branches.
  • Summarize current branch — asks the selected model to create a self-contained continuation summary from Pi's compaction-aware active context.
  • Cancel — leaves the session unchanged.

After a successful fork, continue the conversation normally. The seed is visible to the model as context, but the extension does not automatically trigger a model response.

What stays unchanged

/fork-new keeps the same:

  • session ID and JSONL session file;
  • session name;
  • selected model and thinking level in the running Pi process;
  • cumulative token and cost statistics.

Earlier roots and branches remain accessible through /tree.

Requirements and limits

  • /fork-new requires Pi's interactive TUI.
  • Summary mode requires a selected, authenticated model and makes one model request.
  • The session needs another top-level user or fork-new message that Pi can use as a reset target. Unsupported session layouts are rejected without changing the active branch.
  • Summary cancellation and generation errors occur before navigation, so they leave the active branch unchanged.
  • Pi 0.83.0 cannot checkpoint live model or thinking-level changes without side effects. If those settings changed after the original root, quitting and later resuming the new branch may restore earlier persisted settings.

License

MIT