[agent] add support for oh-my-pi (omp)
Agent name and link
oh-my-pi (omp), a terminal coding agent derived from Pi: https://github.com/can1357/oh-my-pi
Add automatic session detection and status tracking in Séance, like the existing Claude Code, Codex, Pi, OpenCode and Antigravity integrations.
Does the agent have a hook / event system?
Yes. omp loads ES-module extensions (-e <file>, honoured under --no-extensions and any --profile). An extension subscribes to lifecycle events with pi.on(...): agent_start, tool_call, tool_result, tool_execution_end, tool_approval_requested/tool_approval_resolved, session_stop, agent_end (with willContinue), session_switch, plan_review_requested/plan_review_resolved and session_shutdown. The extension API is documented in omp's docs/extensions.md.
The Pi wrapper's CommonJS extension does not load in omp (Extension does not export a valid factory function), so omp needs its own wrapper and extension rather than reusing pi-hook.
Lifecycle events you care about
- Working:
agent_start, then per-tool labels fromtool_call(omp's tool names are lowercase, e.g.readwithpath, whichtoolDescriptioncurrently shows verbatim). - Waiting for permission / input: the
asktool,tool_approval_requested(only when the user opts out of omp's defaultyoloapproval mode), and an open plan review. - Idle:
session_stop, confirmed by the followingagent_endwithoutwillContinue. Another extension can continue a stopped session, and Esc or an error ends a run withoutsession_stop. - Exit:
session_shutdown, plus the wrapper's exit trap for a killed process.
Details that matter for correctness:
- Subagents and advisors run the same extension. Task subagents have
ctx.hasUIfalse. Advisors share the main UI but reportctx.agent.kind === "sub". /newand/forkswitch sessions inside the running process withoutsession_shutdown.- omp sends its own completion and question notifications over OSC. The extension turns those settings off when the user hasn't set them, so each event notifies once.
Context
I have a working implementation with tests on a fork and will open a PR that references this issue: two commits, one per feature. The toolDescription change for lowercase tool names (which also improves Pi's labels) is a separate commit that can be taken on its own.
This was written with AI assistance (Claude); each commit carries an Assisted-by: trailer.