A plugin for omp and pi that adds two commands: /fork-in-herdr forks the current agent conversation into a new herdr tab, /fork-in-tmux into a new tmux window. The new surface gets the full transcript and artifacts of the original, labeled 2 → 2f1, 2f1 → 2f1f1. The original keeps running untouched, with no focus switch.
Why: omp's and pi's built-in /fork continues your current surface on the fork. This plugin puts a divergent conversation in a separate surface.
Requires omp 17.3.5 or newer and herdr 0.8.x for /fork-in-herdr; pi 0.37+ for Pi; tmux for /fork-in-tmux.
omp plugin install https://github.com/onsails/fork-in
pi install git:github.com/onsails/fork-inEach installer reads its own manifest entry and links the same package. Both commands are available in every session.
Inside a herdr tab running omp or pi, type /fork-in-herdr. Inside a tmux pane, type /fork-in-tmux.
- The command refuses an unavailable surface or a busy agent. It changes nothing.
- OMP uses its native
--fork <absolute-source-file>operation. OMP 17.3.5 or newer copies session artifacts and preserves native lineage. - Pi creates one JSONL fork copy with a fresh UUIDv7 and
parentSessionset to the source path. Pi resumes that absolute copy path. - The new surface is adjacent and unfocused. Herdr creates a tab in the same workspace. tmux creates an adjacent window with
remain-on-exit onand a pinned label.
The fork repeats the parent's launch flags for both hosts — --no-skills, --thinking, model selection, profiles, configs, and every other known flag survive the fork. Dropped: session identity flags, one-shot modes and actions, positional prompts, unknown flags, and everything after a bare --. The source session path is absolute.
The original surface is never modified. Herdr reports the observed child OMP session path after a successful start. tmux reports the surface label instead.
- "session has no transcript yet" — send a message first. The host writes the session file after the first turn.
- New surface created but the agent did not start — inspect the retained surface. The error includes a rerunnable command:
omp [forwarded launch flags] --fork /absolute/path/to/source.jsonl, or for Pipi --session /absolute/path/to/fork.jsonl.
bun install
bun run typecheck
bun testTests use fake Herdr and tmux clients and real temporary session files. Domain vocabulary lives in CONTEXT.md. Fork decisions live in docs/adr/0001–0004.
