omp packages

pi-tmux-thread0.1.1

Pi extension for forking conversations into tmux splits or windows

aaronweisberg Published 4 months ago MIT ~277 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-tmux-thread

A small pi package that forks the current conversation into a separate pi process managed by tmux.

The new conversation starts from pi --fork <current-session> so it can continue with the same context, but anything you do there stays out of the current thread.

Install

pi install npm:pi-tmux-thread
# or from GitHub:
pi install git:github.com/aweis89/pi-tmux-thread

For local development:

pi install /path/to/pi-tmux-thread

Then reload pi:

/reload

Commands

/tmux [--select|-s] [split|window] [initial prompt]
/tmux:split [--select|-s] [initial prompt]
/tmux:window [--select|-s] [initial prompt]
/tmux:fork [--select|-s] [split|window] [initial prompt]
/tmux:select [split|window] [initial prompt]
  • /tmux --select or /tmux -s starts the selectable fork workflow.
  • split opens a side-by-side tmux pane in the current tmux window. It requires pi itself to be running inside tmux.
  • window opens a new tmux window. If pi is not already inside tmux, it creates/reuses a detached per-project tmux session and tells you how to attach.
  • The optional prompt is passed to the forked pi process as its first message.
  • --select, -s, or /tmux:select opens a message picker showing only user messages and assistant text responses. The new tmux thread includes the selected message and excludes every later message from the current thread.

Examples:

/tmux:split investigate the failing test without changing this thread
/tmux:window brainstorm an alternate migration plan
/tmux:fork window review the current diff independently
/tmux:select window continue from the message I pick
/tmux:split --select try the other approach from this point
/tmux -s window continue from the message I pick

Agent tool

The package also exposes a tmux_thread tool. The agent should only use it when you explicitly ask for a separate tmux-managed pi thread. Set forkFrom to select to ask you which message should be the last included message.

Notes

  • Requires tmux on PATH.
  • Requires a persisted pi session; it cannot fork an ephemeral --no-session run.
  • Inspired by the tmux management approach in @romansix/pi-tmux and the hidden side-thread workflow in pi-btw.