Proposal: an Oh My Pi (OMP) memory extension that reuses the pi extension, with subagent gating
Oh My Pi (@oh-my-pi/pi-coding-agent) is a pi-derived coding agent. Today OMP users run examples/pi-coding-agent-extension unchanged. That works, with one gap that costs real money: OMP runs many subagents (task, scout, reviewer, ...). The pi extension treats each one as a top-level session, so each is captured and later extracted by the server.
Impact we measured. On one self-hosted server, daily VLM/extraction spend roughly quadrupled (about +300%) within four days. The rise tracks OMP subagent volume. In one day, 119 subagent sessions consumed 24.6M input / 7.1M output tokens (~207k input per subagent) and produced about 3 memories each.
Why not fix it in the pi extension. skipSubagentSessions is already in the shared config schema, but the pi extension doesn't read it, and stock pi (0.87) records no subagent marker to act on: no session_init, no header origin. OMP does record one. It writes a session_init entry with agent: <name> before a subagent's session_start, readable via ctx.sessionManager.getEntries(). parentSession doesn't work as a signal because forks and branches set it too. Putting OMP-only detection into the pi extension seems wrong.
Proposal.
- New
examples/omp-coding-agent-extension/that reuses the pi extension's modules (sync, recall, takeover, MCP bridge, tools, config) andmemory-plugin-sharedwithout copying them. It contains only its ownindex.tswiring:- honours
skipSubagentSessions(subagent =session_init.agentpresent); - optional
subagentRecallAgentsallowlist: listed subagents get recall only (no OV session, no capture), all other subagents get nothing.
- honours
- Own harness key
omp(plugin.ompinovcli.conf) andinstall.sh --harness omp. - If pi's modules can't be imported from a separately installed extension (the installer copies each extension on its own), move them into
memory-plugin-sharedin the same PR, with no behaviour change for pi.
Questions for maintainers.
- Would you accept an OMP extension in
examples/? - Is moving the pi extension's runtime modules into
memory-plugin-sharedacceptable, or would you prefer another reuse shape? - Should
subagentRecallAgentsgo in the shared schema (which triggers the all-plugin version bump) or stay local to the OMP extension?
We have a working patch validated end to end: the parent session is captured, an allowlisted subagent gets recall with no server session, and other subagents get neither. We'll open a PR with tests if you're interested.
Adding a data point from the OMP side, since this issue has been open with no replies.
What I have locally (re-verified today)
$ omp --version
18.5.1
$ ls -l /opt/homebrew/Cellar/omp/18.5.1/bin/omp
208053328 bytes
$ strings /opt/homebrew/Cellar/omp/18.5.1/bin/omp | grep -c -i openviking
0
$ strings /opt/homebrew/Cellar/omp/18.5.1/bin/omp | grep -oE 'memory://[a-z_-]+' | sort -u
memory://root
I ran the same scan on 18.4.10 back on 2026-10-02 and got an identical result, so a minor bump did not change this. The extension route described in this proposal is currently the only path for OMP users.
Why I am asking as an OMP user rather than an OV user
I already run OV through the MCP bridge, so nothing here is broken for me today. What is missing is the memory.backend seam itself — and that part lives in OMP, not here.
From can1357/oh-my-pi#14121, where maintainer @roboomp triaged this:
memory.backendis a closed enum:off | local | hindsight | mnemopi | sharpshooter(packages/coding-agent/src/memory-backend/settings.ts:16).Backend selection is hard-wired in
resolveMemoryBackend(packages/coding-agent/src/memory-backend/resolve.ts:22-29). There is no registry or extension hook, so today an externally distributed backend can't makememory.backend: openvikingresolve without patching omp. The request for a public extension seam is tracked in #7902.Tool exposure is also gated by hardcoded backend lists in
packages/coding-agent/src/tools/index.ts.
So there are two separate gaps, and they close in different repos:
- A native
memory.backend: openviking— blocked in OMP on #7902 (extension seam). Not actionable here. - An OMP-specific OV extension — what this issue proposes. Actionable here, and I would rather use this than wait for #7902.
On the subagent cost concern
This matches what I saw. OMP's subagents are chatty enough that treating each as a top-level captured session gets expensive fast. I do not have independent token numbers for my own setup, so I am not going to put a figure on it — but the direction is right, and gating subagents away from capture is the part that matters to me most.
What would help me adopt it
- A published
install.sh --harness omp, or any documented way to tell which OMP version a given extension build was tested against. - The harness key you propose (
ompinovcli.conf), so my existing pi-extension config isn't silently reused.
One question: does the reuse-the-pi-modules approach depend on OMP's pi-extension ABI staying stable? If it tracks OMP releases closely, I would rather pin a known-good pair than track main.