Summary
OMP (@oh-my-pi/pi-coding-agent) is a published variant of pi-coding-agent with a different binary name (omp vs pi), config directory (~/.omp/ vs ~/.pi/), and resume flag (omp --resume <id> vs pi --session <id>). It shares pi-coding-agent's extension API (same pi.on("session_start", …) shape), so the bridge generated by cmux hooks pi install actually works against OMP — but the agent gets labelled pi in Feed → By Agent and the saved launch/resume command is wrong for restore.
This bites users who run OMP exclusively or alongside pi, because:
- Feed → By Agent groups OMP sessions under Pi alongside genuine pi sessions, making it impossible to tell them apart.
~/.cmuxterm/pi-hook-sessions.json saves launchCommand.executablePath: "pi" for OMP sessions, so app relaunch will try pi --session <id> and fail (no pi on PATH, or worse, finds a different pi install).
Repro
- Install OMP globally:
bun add -g @oh-my-pi/pi-coding-agent (provides omp binary; no pi symlink).
cmux hooks pi install — cmux generates ~/.omp/agent/extensions/cmux-session.ts (it auto-detects the OMP install path, good).
- Start an OMP session in a cmux pane:
omp (or omp --resume <id>).
- Inspect
~/.cmuxterm/pi-hook-sessions.json:
"019e6f6c-921d-7000-8aa1-8cdc9285738f" : {
"launchCommand" : {
"executablePath" : "pi",
"launcher" : "pi",
"source" : "environment",
"environment" : { "PI_CODING_AGENT_DIR" : "/Users/noam.siegel/.omp/agent" }
},
"runtimeStatus" : "idle"
}
Note executablePath: "pi" even though the actual process is bun … omp. cmux is identifying via PI_CODING_AGENT_DIR env and assuming the binary name.
- In Feed → By Agent, the entry appears under Pi, mixed with real pi sessions.
- Quit and relaunch cmux: session restore runs
pi --session <id>, which fails because the user only has omp.
Proposed fix
Add omp as a recognised agent in cmux hooks setup, parallel to (but distinct from) pi. From the existing docs/agent-hooks.md integration matrix, OMP would look like:
| Agent |
Binary checked |
Installed file |
Session restore |
Feed bridge |
| OMP |
omp |
~/.omp/agent/extensions/cmux-session.ts |
omp --resume <id> |
none |
Concrete changes (INFERENCE — I haven't read cmux's Swift source; pointer to TerminalStartupEnvironment.swift is from DeepWiki §6.4):
- Agent registry — add
omp alongside pi, amp, rovodev, etc., in the cmux hooks agent list.
- Binary detection — sniff
omp on PATH (in addition to pi); when both exist, prefer the one matching the live process's executable.
- Process-tree identification — when a session_start hook fires, look at the actual process executable (
/proc/<pid>/exe equivalent / argv[0] of the bun wrapper) instead of inferring from PI_CODING_AGENT_DIR. The current code path mislabels OMP as pi because both set the same env var.
- Bridge template —
cmux hooks omp install writes the same cmux-session.ts content as pi (the extension API is byte-identical) but with cmux hooks omp <event> calls in place of cmux hooks pi <event>, so events are tagged --source omp.
- Resume command —
omp --resume <id>, not pi --session <id>. OMP also accepts omp --session <id> for forward-compat AFAICT, but --resume is the documented flag.
- Sessions file —
~/.cmuxterm/omp-hook-sessions.json separate from pi-hook-sessions.json.
- Env override —
CMUX_OMP_HOOKS_DISABLED=1 (matches the existing CMUX_PI_HOOKS_DISABLED=1 pattern).
- Config dir override —
OMP_AGENT_DIR (mirroring PI_CODING_AGENT_DIR).
Why this lives in cmux, not OMP or pi-coding-agent
- The agent registry, binary sniffer, hook generator, and Feed grouping all live in cmux. OMP can't register itself without cmux acknowledging its existence first.
- pi-coding-agent has no opinion on cmux. The extension API is generic.
- OMP already ships cmux-aware extensions for the pieces it can control independently (
cmux-tab-title.js, cmux-workspace-reaper.js), but the agent-registry side is cmux-only territory.
Verification
After the fix, the same repro produces:
// ~/.cmuxterm/omp-hook-sessions.json
"019e6f6c-921d-7000-8aa1-8cdc9285738f" : {
"launchCommand" : {
"executablePath" : "omp",
"launcher" : "omp",
…
}
}
And Feed → By Agent shows separate OMP and Pi buckets.
Environment
- cmux 1.3.2-HEAD-+ff6e126 (Ghostty 1.3.2-HEAD)
@oh-my-pi/pi-coding-agent@15.5.10
- macOS 25.4.0 (Darwin) arm64
bun --version 1.2.x (binary at ~/.local/share/bun/bin/omp)
Happy to test a fix or write the integration if you'd like a PR.
Summary
OMP (
@oh-my-pi/pi-coding-agent) is a published variant of pi-coding-agent with a different binary name (ompvspi), config directory (~/.omp/vs~/.pi/), and resume flag (omp --resume <id>vspi --session <id>). It shares pi-coding-agent's extension API (samepi.on("session_start", …)shape), so the bridge generated bycmux hooks pi installactually works against OMP — but the agent gets labelledpiin Feed → By Agent and the saved launch/resume command is wrong for restore.This bites users who run OMP exclusively or alongside pi, because:
~/.cmuxterm/pi-hook-sessions.jsonsaveslaunchCommand.executablePath: "pi"for OMP sessions, so app relaunch will trypi --session <id>and fail (nopion PATH, or worse, finds a different pi install).Repro
bun add -g @oh-my-pi/pi-coding-agent(providesompbinary; nopisymlink).cmux hooks pi install— cmux generates~/.omp/agent/extensions/cmux-session.ts(it auto-detects the OMP install path, good).omp(oromp --resume <id>).~/.cmuxterm/pi-hook-sessions.json:executablePath: "pi"even though the actual process isbun … omp. cmux is identifying viaPI_CODING_AGENT_DIRenv and assuming the binary name.pi --session <id>, which fails because the user only hasomp.Proposed fix
Add
ompas a recognised agent incmux hooks setup, parallel to (but distinct from)pi. From the existingdocs/agent-hooks.mdintegration matrix, OMP would look like:omp~/.omp/agent/extensions/cmux-session.tsomp --resume <id>Concrete changes (INFERENCE — I haven't read cmux's Swift source; pointer to
TerminalStartupEnvironment.swiftis from DeepWiki §6.4):ompalongsidepi,amp,rovodev, etc., in thecmux hooksagent list.ompon PATH (in addition topi); when both exist, prefer the one matching the live process's executable./proc/<pid>/exeequivalent /argv[0]of the bun wrapper) instead of inferring fromPI_CODING_AGENT_DIR. The current code path mislabels OMP as pi because both set the same env var.cmux hooks omp installwrites the samecmux-session.tscontent as pi (the extension API is byte-identical) but withcmux hooks omp <event>calls in place ofcmux hooks pi <event>, so events are tagged--source omp.omp --resume <id>, notpi --session <id>. OMP also acceptsomp --session <id>for forward-compat AFAICT, but--resumeis the documented flag.~/.cmuxterm/omp-hook-sessions.jsonseparate frompi-hook-sessions.json.CMUX_OMP_HOOKS_DISABLED=1(matches the existingCMUX_PI_HOOKS_DISABLED=1pattern).OMP_AGENT_DIR(mirroringPI_CODING_AGENT_DIR).Why this lives in cmux, not OMP or pi-coding-agent
cmux-tab-title.js,cmux-workspace-reaper.js), but the agent-registry side is cmux-only territory.Verification
After the fix, the same repro produces:
And Feed → By Agent shows separate OMP and Pi buckets.
Environment
@oh-my-pi/pi-coding-agent@15.5.10bun --version1.2.x (binary at~/.local/share/bun/bin/omp)Happy to test a fix or write the integration if you'd like a PR.