Repository navigation
EPIC — OMP Native Chat migration to ACP with parity-first cutover #21
Description
Program: #66
Goal
Migrate OMP Native Chat from the existing terminal/transcript implementation to native ACP, preserving at least full behavioral and reliability parity before ACP becomes the default.
Canonical design: #20
This epic is now OMP-only. Pi has been split into a separate cross-repo epic/program because Pi first needs an ACP bridge/adapter before Orca onboarding.
Foundation
The required generic structured-provider stack is merged into upstream Orca main as of October 6, 2026:
- registered provider identity/capabilities;
- open wire/storage agent vocabulary;
- managed provider process lifecycle;
- shared timeline assembler;
- provider-event journal operations;
- standalone ACP client;
- ACP → timeline translation.
We therefore develop from current upstream main, not Brennan's former stack branch.
Migration rule
No existing OMP Native Chat guarantee may become weaker under ACP.
Parity is a release gate, not a best-effort target.
ACP extensions and new OMP capabilities are intentionally a later phase.
Execution plan
Phase 0 — define the migration contract
- OMP-0 — Freeze the terminal/transcript Native Chat parity contract #52 — OMP-0: inventory/freeze terminal Native Chat parity guarantees
Phase 1 — establish native ACP
- OMP-1 — Register OMP as a structured ACP provider and launch
omp acp#53 — OMP-1: register OMP and launchomp acpthrough shared provider lifecycle — depends on OMP-0 — Freeze the terminal/transcript Native Chat parity contract #52 - OMP-2 — Migrate OMP history, reasoning, tools, edits, usage, and timeline parity to ACP #54 — OMP-2: migrate history/timeline/rendering parity — depends on OMP-1 — Register OMP as a structured ACP provider and launch
omp acp#53 - OMP-3 — Migrate OMP composer input, options, commands, images, and interactions parity to ACP #55 — OMP-3: migrate input/options/commands/interactions parity — depends on OMP-1 — Register OMP as a structured ACP provider and launch
omp acp#53
#54 and #55 may proceed in parallel once the basic ACP provider is live.
Phase 2 — reliability + cutover
- OMP-4 — Prove ACP reliability parity for restart, cancel, process death, mobile, and runtime ownership #56 — OMP-4: restart/cancel/process/mobile/runtime parity — depends on OMP-2 — Migrate OMP history, reasoning, tools, edits, usage, and timeline parity to ACP #54 + OMP-3 — Migrate OMP composer input, options, commands, images, and interactions parity to ACP #55
- OMP-5 — Make ACP the default OMP Chat path with safe legacy-session adoption and fallback #57 — OMP-5: make ACP the default and migrate/fallback legacy sessions — depends on OMP-4 — Prove ACP reliability parity for restart, cancel, process death, mobile, and runtime ownership #56
Phase 3 — extend beyond terminal parity
- OMP-6 — Expose the full useful OMP ACP surface through extension/unknown ACP messages #58 — OMP-6: consume OMP ACP extensions / unknown ACP messages — depends on OMP-5 — Make ACP the default OMP Chat path with safe legacy-session adoption and fallback #57
- OMP-7 — Clean up OMP Chat migration, retire obsolete structured-terminal glue, and prepare upstream contribution #59 — OMP-7: cleanup, hardening, upstream readiness — depends on OMP-6 — Expose the full useful OMP ACP surface through extension/unknown ACP messages #58
Dependency graph
#52 parity contract
↓
#53 basic native OMP ACP provider
├──────────────┐
↓ ↓
#54 timeline #55 controls/interactions
└───────┬──────┘
↓
#56 reliability / restart / runtime parity
↓
#57 ACP-default migration + safe fallback
↓
#58 full OMP ACP extension set
↓
#59 cleanup / upstream-ready
Required parity dimensions
At minimum the epic must account for:
- existing conversation/session visibility;
- transcript/history ordering;
- reasoning;
- tools and edit rendering;
- model/provider/usage metadata;
- compaction boundaries;
- session options/model switching;
- slash commands;
- skills/autocomplete;
- images;
- questions/approvals;
- local commands;
- status/settlement;
- resume/restart;
- mobile projection;
- current supported runtime/locality cases;
- errors/failures;
- no duplicate replay.
#52 owns the final authoritative matrix.
Cutover rule
Before #57:
- terminal/transcript Native Chat remains available;
- ACP can be experimental/provider-gated.
At #57:
- ACP becomes default only for OMP versions/environments proven compatible;
- unsupported cases continue using the old path;
- existing stored chats either adopt the same OMP session safely or stay on fallback.
Do not delete fallback code simply to simplify the migration.
Extension rule
#58 may use unknown/extension ACP messages to expose OMP capabilities beyond the previous terminal path.
Provider-neutral concepts should be contributed to Orca's generic ACP layer.
OMP-specific concepts remain a narrow dialect.
Cross-repo provider fixes
Provider-side gaps belong in 44madfire/oh-my-pi, linked to this epic.
Do not expand this epic into Pi work.
Completion criteria
- ACP OMP is at least feature-parity with current terminal Native Chat.
- ACP OMP is at least reliability-parity with current terminal Native Chat.
- Existing compatible OMP conversations can resume through ACP without duplication/loss.
- Unsupported/legacy cases fall back explicitly.
- ACP is the default structured Chat path for supported OMP.
- Full useful OMP ACP extension set is mapped or explicitly classified.
- Ordinary OMP terminal operation remains available.
- Claude/Codex/other structured providers regressions remain green.
- Provider-side fixes, if any, live in OMP rather than Orca workarounds.
Activity
[-]EPIC — Native Pi structured sessions over upstream Pi RPC[/-][+]EPIC — Native Pi-family structured sessions over Pi/OMP RPC[/+]44madfire commentedon Sep 23, 2026
Upstream dependency is now satisfied: can1357/oh-my-pi#12900 merged on 2026-09-23 at
6f2233877756b5553ce520756dd90315d2ff6ee3.The shared Pi-family routing plan is therefore unblocked against canonical upstream OMP. No downstream OMP compatibility fork is required for the core history/tree/thinking RPC surface.
Implementation can proceed with #22 (durable Pi/OMP identity + routing) and #23 (shared Pi-family RPC transport) as the first workstreams, followed by the existing dependency chain #24–#30.
44madfire commentedon Sep 26, 2026
PIF epic implementation complete — all nine children merged into the epic integration branch
All child issues #22–#30 are implemented, independently reviewed, and merged into
44madfire/epic-native-pi-family-structured-sessions-over-p(head7f7e9f785).Nothing was merged to
main.Verification on the merged epic branch
tsc --noEmit -p config/tsconfig.node.json→ exit 0.vitest run src/main/pi→ 597 passed, 6 skipped, 5 failed. All five failures are thesupportsCreate(LOCAL, ...)location-gate assertions and were verified to failidentically on the pristine pre-epic commit
f4273161e: the@vscode/windows-process-treenative addon cannot be rebuilt in this environment, sothe Windows process start-time proof is unavailable and the gate fails closed by
design. They are environment artifacts, not regressions.
git diff f4273161e..HEAD -- src/main/claude src/main/codex src/main/claude-accounts src/main/codex-accountsis empty: Claude/Codex are untouched.
router → single Pi-family adapter → production backend → scripted
pi/ompchildren.Epic invariants verified
neither provider routes through
external, plugin IPC, ororca-pi.sessionIdacross Pi and OMPnever compares as the same root.
agent_settled;OMP terminal
agent_end { isTerminal !== false }) and lives on the live session, notthe transport.
unknownand is never auto-resent.Notable findings from review
Three blockers were real production defects rather than review noise:
ompalso made capability gatesanswer "structured launch supported" for
ompwhile the RPC create/attach path stillrefused it. That stranded a provisional chat as
visibility-unknownwith no terminalfallback, and let an
ompattach spawn api --mode rpcchild before the durablestore rejected it. Fixed with an explicit creatability set separate from handle
validity; later widened by [SUPERSEDED] PIF-3 — Implement Pi-family acquisition, exact resume, process identity, and proven close #24 only once a genuine acquisition path existed.
coalesced into the same stdout read was observed with nothing pending and never
retried (reproduced as a 5/15 flaky test; now 15/15 after arming before the write,
mirroring the existing Codex ordering). Separately, a failed pre-dispatch history read
was indistinguishable from a genuinely fresh session, so settlement could adopt an
unrelated entry id. Both re-verified closed by a second review.
prompt_result { agentInvoked:false }(OMP local-only) never cleared the liveturn, so a second prompt was refused with
already-streamingandreadResumeHistorythrew
PI_HISTORY_BUSY, permanently wedging the conversation and breaking the [SUPERSEDED] PIF-8 — Implement Pi-family provider-history reconciliation and structured↔TUI continuity #29TUI→structured rebuild. The regression guard was confirmed by reverting only the driver
change and watching the strengthened test fail.
The changed-code quality gate caught real type-assertion violations on #25/#26 that
reviewers had graded non-blocking; because CI enforces that gate, both were fixed before
their PRs were submitted.
Retention decision on #30
Issue #30's inventory listed ten legacy paths for potential deletion. Review audited each
one independently and agreed with the implementer's retention of all ten: they are the
live direct-RPC implementation (transport, driver chain, translation), the adapter's own
dependency contract, the separately-gated SNC1.3 dev seam that packaged Orca never
installs, or ordinary TUI/status functionality still needed outside structured Native
Chat. No deletion was safe, so none was made — a verified finding rather than an omission.
Known follow-ups (recorded in PR bodies, not blocking)
A deterministic test pinning the arm-before-write ordering; stale-trigger fencing;
prompt_resultid correlation; an end-to-end runtime late-settlement test; the doubleimage read on the dispatch path; payload bounding; and the fact that settlement remains
event-driven, so a single-turn session can retain a pending until the restart path
reconciles it. #30 additionally noted that its new suite is router-level, so #30's
"host-level" wording is satisfied by composing it with the existing restart-settlement and
handoff suites.
Not done
The optional real-binary smoke tests (
pi --mode rpc/omp --mode rpcreadiness andclean close) were not run, since they require installed provider binaries and were
deliberately specified not to become a CI dependency.
44madfire commentedon Sep 30, 2026
Completion-report review — BLOCK before epic close / main merge
The report is well supported on the integration branch itself: all nine child PRs are merged into
44madfire/epic-native-pi-family-structured-sessions-over-p(current merge head7f7e9f785), the branch is 27 commits ahead / 0 behindmain, and the child PR review history matches the report.I found two current-upstream OMP compatibility blockers plus one unmet #30 acceptance requirement.
1. BLOCK — current OMP local-only prompt completion is not handled
The merged Orca branch still models OMP local-only completion as a later:
and
PiRpcSessionDriver.deliverPiRecord()clearsactiveOponly when that record arrives.But canonical OMP has moved on. In current OMP 18.4.5:
data.agentInvoked:false;prompt_resultis emitted for that prompt;prompt_resultis emitted and correlated by the prompt commandid.OMP documents this explicitly in
docs/rpc.md, and its own RpcClient returns immediately when responsedata.agentInvoked === false.Orca currently discards that information:
PiRpcConnectionCommands.prompt()returnsPromise<void>and ignores the response payload. Against current OMP, a locally handled command can therefore leaveactiveOparmed forever — the same user-visible wedge #50 fixed for the older scripted behavior (follow-up dispatch rejected as already-streaming; resume history remains busy).Required repair: carry the prompt acknowledgement/result metadata (and request id) through the Pi-family connection/driver, retire a local-only op directly from
data.agentInvoked:false, and update the OMP scripted fixture/test so local-only completion has no laterprompt_result.This is also the right place to close the existing “prompt_result id correlation” follow-up: current upstream explicitly requires correlation on
id.2. BLOCK — OMP final-settlement predicate is stale
The epic currently treats:
Current OMP now explicitly separates:
agent_end= one agent run yielded;session_settled= the entire session is quiescent (no live/admitted run, queued message, or background work that can wake it again).Current OMP also puts a
sessionSettledboolean on correlatedprompt_result.That distinction matters to Orca: using terminal
agent_endas whole-session settlement can clear activity/prompts, run history settlement, or allow handoff/new work while agent-owned background work can still wake OMP again.Required repair: revise the OMP flavor/lifecycle contract to use current upstream session-quiescence semantics. Treat
agent_endas a run/yield boundary, use correlatedprompt_resultfor the prompt's outcome, and usesession_settled(or equivalent proven state) for whole-session idle/finality. Update #20/#21's dialect table and the #24/#25/#26/#30 fixtures accordingly.The original baseline at OMP PR stablyai#12900 was valid when designed, but #21 says OMP is supported at or after that baseline. The completed branch needs to match canonical OMP today, not only the older fixture.
3. MAJOR — #30's required host-level integration suite is still missing
#30 explicitly requires:
and says not to bypass the host by testing only the adapter.
The new
pi-family-router-integration.test.tsstarts at:It does not instantiate
StructuredAgentSessionHost, the durable record store, lease/fence lifecycle, or real journal host path.The completion report acknowledges this and argues that the router suite plus separate restart/handoff/record tests “compose” to satisfy the requirement. I checked those suites:
pi-family-restart-settlement.test.tsandpi-family-tui-handoff.test.tsalso do not instantiateStructuredAgentSessionHost.That is useful layered coverage, but it is not the explicit host-level integration gate we wrote into #30.
Required repair: add one scripted Pi/OMP integration test that actually enters through
StructuredAgentSessionHostand reaches the shared adapter/production backend/scripted child. It need not duplicate every #30 scenario, but it should prove the primary happy-path ownership/journal lifecycle through the host boundary.Validation caveat (not a code blocker by itself)
There are no GitHub workflow runs on integration head
7f7e9f785. The reported 5src/main/pifailures were reproduced on the pre-epic base and are credibly environment-specific, and Claude/Codex source directories are unchanged. Still, before merging the epic branch tomain, the final integration PR should run the normal CI on a supported environment so the epic criterion “Claude/Codex regressions remain green” is demonstrated rather than inferred.What looks good
I do not see a reason to reopen the earlier child-PR blockers that were fixed:
The remaining items in the report such as double image reads, stale-trigger attempts (where settlement proof itself is generation-fenced), dead-code hygiene, and optional real-binary smoke tests can remain follow-ups once the three items above are resolved.
Review outcome: implementation is close, but I would not mark #21 complete or open the final main-merge PR as ready until the current OMP prompt/session-settlement contract is updated and the required host-level integration test exists.
44madfire commentedon Oct 1, 2026
Re-review status — blockers still open
I re-checked the implementation after the previous completion-report review.
There is currently no new code delta on the epic integration branch:
44madfire/epic-native-pi-family-structured-sessions-over-p7f7e9f7851939f89ebebfdf1970d9c742e6e42b2I also re-checked canonical OMP upstream. Current OMP remains on the newer prompt/session lifecycle contract described in the prior review:
data.agentInvoked:falseand no laterprompt_result;prompt_resultframes are correlated by prompt requestid;agent_endis a run/yield boundary, whilesession_settledrepresents whole-session quiescence.The epic branch still:
PiRpcConnectionCommands.prompt(): Promise<void>;prompt_result;agent_endas final settlement;StructuredAgentSessionHost → router → adapter → production backend → scripted childintegration test required by [SUPERSEDED] PIF-9 — Remove superseded Pi/OMP bridge paths and harden end-to-end structured integration #30.So the previous review outcome remains unchanged: BLOCK before epic close / merge to main.
Once a repair branch/PR is pushed, the next review should focus narrowly on:
prompt_result/session_settledhandling;feat(pi-family): resolve #21 completion-review blockers for OMP contr…
[-]EPIC — Native Pi-family structured sessions over Pi/OMP RPC[/-][+]EPIC — OMP and Pi structured Native Chat over ACP[/+]44madfire commentedon Oct 5, 2026
Architecture pivot recorded: this epic now targets ACP for both OMP and Pi on top of Brennan's active registered-provider/ACP stack.
New path:
omp acp#53 ACP contract/parity auditomp acppi-acpproofDirect Pi/OMP RPC remains reference/fallback research only unless the ACP parity work finds a concrete blocker.
[-]EPIC — OMP and Pi structured Native Chat over ACP[/-][+]EPIC — OMP Native Chat migration to ACP with parity-first cutover[/+]44madfire commentedon Oct 7, 2026
Superseded by the v2 plan in #67 (project https://github.com/users/44madfire/projects/3).