Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fork-in

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 22f1, 2f12f1f1. 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.

Demo

fork-in demo

Install

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-in

Each installer reads its own manifest entry and links the same package. Both commands are available in every session.

Use

Inside a herdr tab running omp or pi, type /fork-in-herdr. Inside a tmux pane, type /fork-in-tmux.

  1. The command refuses an unavailable surface or a busy agent. It changes nothing.
  2. OMP uses its native --fork <absolute-source-file> operation. OMP 17.3.5 or newer copies session artifacts and preserves native lineage.
  3. Pi creates one JSONL fork copy with a fresh UUIDv7 and parentSession set to the source path. Pi resumes that absolute copy path.
  4. The new surface is adjacent and unfocused. Herdr creates a tab in the same workspace. tmux creates an adjacent window with remain-on-exit on and 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.

Troubleshooting

  • "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 Pi pi --session /absolute/path/to/fork.jsonl.

Develop

bun install
bun run typecheck
bun test

Tests use fake Herdr and tmux clients and real temporary session files. Domain vocabulary lives in CONTEXT.md. Fork decisions live in docs/adr/00010004.

About

No description or website provided.

Topics

Resources

Stars

9 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages