GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Proposal: native plan mode over OMP RPC/RPC-UI · Issue #9230 · can1357/oh-my-pi

Proposal: native plan mode over OMP RPC/RPC-UI #9230

New issue
Copy link
New issue
Copy link
Not planned
Not planned
Proposal: native plan mode over OMP RPC/RPC-UI#9230
Copy link
Labels
cliCLI commands and argumentsduplicateThis issue or pull request already existssdkSDK and extension integration surfacestaletriaged

Description

@joeshull
joeshull
opened on Aug 21, 2026
Issue body actions

Proposal: native plan mode over OMP RPC/RPC-UI

Summary

OMP v17.4.0 exposes native interactive plan mode through InteractiveMode and ACP, but not through RPC/RPC-UI. Paseo must remain on rpc-ui; ACP migration is outside this proposal.

This proposal defines an additive, capability-gated OMP RPC/RPC-UI contract that lets a client project OMP's existing native plan lifecycle without creating a second state machine. OMP remains authoritative for lifecycle legality, persistence, writer guards, model/tool restoration, proposal decisions, and implementation handoff.

This is a design proposal for maintainer discussion, not an implementation assignment or an implementation reservation. Because this is a major architectural/behavioral change, the contribution must be discussed in the OMP Discord before implementation begins. That discussion is a required contribution gate, not maintainer approval; a GitHub issue is not a substitute, and prior discussion does not guarantee that a later pull request will be merged.

Problem and goals

The RPC/RPC-UI surface currently lacks:

  • capability discovery for native plan mode;
  • an authoritative plan snapshot and revisioned state event;
  • lifecycle commands for activation, pause, resume, and disable;
  • a proposal decision and deduplication protocol; and
  • durable handoff/recovery semantics.

The v1 goal is an additive OMP contract with these properties:

  • OMP's shared/native plan controller owns every lifecycle mutation; RPC never mutates PlanModeState directly.
  • State is persisted before the corresponding transition is advertised.
  • Native writer-guard behavior is preserved, including the validated session-local artifact exception.
  • At most one proposal is actionable; replacement, decisions, and handoff state are authoritative and durable.
  • RPC stdin EOF terminates the OMP process. A later OMP process restores durable state through a new ready snapshot; v1 does not add transport reattachment.
  • Old clients and old runtimes continue normal behavior because every new field, capability, and command is optional.

Proposed v1 contract

Capability and bootstrap

Advertise support only after the OMP runtime implements the contract:

capabilities?: {
  plan_mode?: { version: 1 };
}

Unknown versions are unavailable. A client exposes native plan controls only when ready advertises exactly a supported version.

A capable ready message includes the complete authoritative snapshot and durable revision:

{
  capabilities?: { plan_mode?: { version: 1 } };
  planMode?: PlanModeSnapshot;
  planModeRevision?: number;
}

OMP persists the revision with canonical plan state and increments it for every observable authoritative transition. The client installs the ready snapshot/revision before accepting live events. A plan_mode_updated event is accepted only when its revision is greater than the installed revision; events received before ready and events with non-increasing revisions are ignored. get_plan_state is an explicit resynchronization operation, not a competing bootstrap or reconnect path.

Do not add process-generation fields or same-process reconnect machinery in v1. EOF rejects pending bridges, drains/disposes the session, and exits the OMP process. If a decision was durably committed before disconnect but its response was lost, retrying the same decision ID and payload returns the stored result. Without a durable commit, retry proceeds normally.

Snapshot and persistence

type PlanModeSnapshot = {
  status: "inactive" | "active" | "paused" | "handoff";
  proposal?: {
    proposalId: string;
    title: string;
    planText: string;
  };
  handoff?: {
    handoffId: string;
    proposalId: string;
    status: "claimed" | "started" | "interrupted";
  };
};

Invariants:

  • proposalId and handoffId are opaque and session-scoped.
  • At most one proposal is actionable.
  • Replacement atomically supersedes the prior proposal; decisions for the replaced proposal return stale.
  • Mode, proposal reconstruction data, durable decision records, handoff record, approved plan context, and revision are persisted atomically.
  • OMP-owned database/file paths, artifact URLs, resolved local/sandbox paths, and other storage metadata are never protocol fields or leaked error details.
  • title and planText are user-authored content. Repository paths, absolute paths, local:// references, and other path-like text in them are preserved unchanged.

Commands and results

All plan commands call the shared/native OMP plan controller. Valid plan commands return a typed result, including no-op, stale, busy, and invalid outcomes:

type PlanModeResult = {
  requestId: string;
  outcome:
    | "accepted"
    | "in_progress"
    | "completed"
    | "stale"
    | "invalid"
    | "unsupported"
    | "busy"
    | "confirmation_required";
  planMode: PlanModeSnapshot;
  planModeRevision: number;
};

Malformed transport/schema requests use the normal RPC error mechanism.

set_plan_mode

{ intent: "activate" | "exit" | "resume" | "disable" }
Current state Intent Required result
inactive activate Enter native active state and apply native writer guards.
active, no actionable proposal exit Apply native draft-content confirmation rules; confirmed exit becomes paused.
active with proposal exit Return busy; decide or dismiss first; no state change.
paused resume Enter active.
paused disable Enter inactive and clear fresh-session plan-entry intent.
active disable Return busy/invalid; use native exit to reach paused, then explicit disable.
inactive resume or disable Follow controller idempotence/invalid semantics; never implicitly activate.
Any handoff state Any intent Return busy with the authoritative snapshot; no state change.
Already at target state Corresponding intent Return idempotent completed with the snapshot.

Confirmed active exit preserves native active -> paused behavior and durable plan_paused state. Full disable is a separate explicit paused -> inactive transition. Draft/no-draft confirmation, resume, disable persistence, busy behavior, and idempotence require coverage.

respond_to_plan_proposal

{
  proposalId: string;
  decisionId: string;
  action: "approve" | "refine" | "dismiss";
}

The durable decision key is exactly (sessionId, proposalId, decisionId). Store a canonical payloadHash for the normalized decision payload (proposalId, decisionId, action, and any future versioned decision fields; not the transport requestId).

  • Same key and same hash: return the original stored result with no side effect.
  • Same key and different hash: return invalid with no side effect; retain the original record.
  • Unknown, replaced, or non-current proposal: return stale with no side effect.
  • Concurrent same-ID requests serialize against one durable record, including different-payload races.

V1 approval has exactly one meaning: invoke the existing native Approve and execute branch, equivalent to #approvePlan with preserveContext: false, compactBeforeExecute: false, and no executionModel override. OMP exits plan mode, restores the native execution tool set, and queues the native approved-plan turn.

refine atomically clears the actionable proposal, returns to native active planning, and waits for the user's next ordinary feedback prompt; it does not inject an automatic model turn or implementation prompt. dismiss atomically clears the proposal and remains in native active planning without implementation.

continue_plan_handoff

{
  handoffId: string;
  proposalId: string;
  decisionId: string;
}

This explicit user action is valid only for a matching handoff.interrupted record. It uses persisted approved plan context and invokes the same v1 Approve and execute continuation branch once. It is durable and idempotent: use a new decision record keyed by (sessionId, proposalId, decisionId) with a stored payload hash; identical retries return the saved result and hash conflicts return invalid. It never replays automatically after a later process restart.

Handoff and crash recovery

Approval enters handoff before continuation:

  1. Atomically persist handoff.claimed, approved plan context, proposal/decision identity, a non-terminal decision reservation, and the next revision.
  2. Emit the claimed snapshot before returning the command result.
  3. Start the native v1 execution branch once.
  4. Persist and emit handoff.started before reporting continuation started.
  5. After native continuation is established, persist and emit terminal inactive (plan mode has exited for implementation).
  6. If dispatch fails before continuation starts, atomically roll back the claimed handoff and non-terminal decision reservation, restore the actionable proposal, emit active, and permit the same decision retry to create a fresh reservation.
  7. If continuation fails after it starts, or a process restarts while claimed or started, retain the decision record, persist/emit handoff.interrupted, and never replay automatically. Keep approved plan context only for explicit continue_plan_handoff.

A later process restores handoff.interrupted before ready; it does not claim that a live connection survived. At-most-once applies to automatic continuation. Exactly-once external model/tool effects are not promised.

Session-changing commands and ordering

new_session, switch_session, branch, and generic handoff must be serialized with proposal decisions and continue_plan_handoff:

State Required behavior
active with actionable proposal Reject busy; preserve proposal; do not consume, silently invalidate, or change session.
handoff.claimed or handoff.started Reject busy; do not orphan, interrupt, or duplicate continuation.
handoff.interrupted Reject busy; require explicit continue_plan_handoff first.
active without proposal, paused, or inactive Preserve existing native command semantics, with durable state/event ordering.

A racing loser returns busy or stale with the current authoritative snapshot and never reports success for an obsolete proposal/handoff. Every accepted session transition persists its new canonical state and emits its authoritative event before returning its RPC result.

Events and ordering

Emit a complete snapshot for every observable lifecycle transition:

{
  type: "plan_mode_updated";
  planMode: PlanModeSnapshot;
  planModeRevision: number;
}

Persistence commit precedes event emission; event emission precedes the corresponding command response. Replacement, decision completion, handoff claim/start/interruption, pause, resume, disable, and accepted session transitions must be observable with correct snapshots. Repeated identical decision results need not emit a new transition event.

Compatibility and client responsibilities

OMP runtime Client Required behavior
No capability/old runtime New client Hide native plan controls; preserve normal OMP behavior.
V1 capability Old client Ignore optional capability/state/event fields; preserve normal behavior.
V1 capability V1 client Use the full contract.
OMP process restarts V1 client Reattach only by launching/connecting to the new process, install its ready snapshot, discard transient permissions, and rebuild UI from durable canonical state.
Capability disappears V1 client Clear the live card/control from the authoritative snapshot; never auto-enter plan mode.

Paseo remains on rpc-ui. It maps OMP's single current proposal to one shared permission_requested event with kind: "plan", sends fresh decision IDs, and projects OMP snapshots/events. It does not resolve OMP storage paths, construct implementation prompts, implement legality checks, or expose native plan as a fourth approval mode. planModel/--plan <model> remains independent. Feature configuration is fresh-session entry intent only; loaded/resumed OMP state wins.

Writer-guard compatibility

Reuse the native enforcePlanModeWrite boundary. Preserve native behavior for write/edit/patch/replace/hashline/archive/sqlite and target resolution, including rejection of worktree/out-of-sandbox mutations, deletion, and rename, while allowing validated session-local artifact writes (local://, hashline, and realpath cases) that native OMP permits. Existing xd://propose dispatch remains available.

Adding plan state must not claim or create universal enforcement. Bash, arbitrary xd:// devices, MCP, extensions, custom tools, subprocesses, and their existing approval/prompt policies remain authoritative; RPC/RPC-UI must not broaden or narrow those policies as a side effect.

Acceptance criteria

A maintainer-ready implementation should include:

  1. Optional capability/schema compatibility: old clients and runtimes retain normal behavior; unknown versions remain hidden/unavailable.
  2. Ready bootstrap and revision filtering: full snapshot installed before events; pre-ready and non-increasing revisions ignored; get_plan_state resynchronizes.
  3. Terminal RPC EOF behavior and later-process restoration of mode, proposal, decision, and handoff state; no same-process reconnect claim.
  4. The complete set_plan_mode table, including draft confirmation, active -> paused, separate paused -> inactive, resume, busy, and idempotence.
  5. Proposal creation, one-card replacement, stale decisions, and authoritative snapshot correctness.
  6. Exact decision deduplication key and payload-hash conflict behavior, including sequential/concurrent races and no duplicate side effects.
  7. Approval uses only the named Approve and execute branch; compact, keep-context, and execution-model variants are unsupported in v1. Refine/dismiss do not inject an automatic turn.
  8. Handoff claim/start/terminal ordering; pre-start rollback restores the actionable proposal and removes the non-terminal reservation; retries start exactly one continuation; post-start failure, lost acknowledgements, restart interruption, explicit Continue, and no automatic replay are covered.
  9. Race coverage for new_session, switch_session, branch, and generic handoff against approve, refine, dismiss, and Continue in every proposal/handoff state.
  10. Native writer-guard coverage for write/edit/patch/replace/hashline/archive/sqlite, local/absolute/hashline/symlink resolution, deletion/rename rejection, and allowed local artifacts.
  11. Path-metadata boundary coverage: known OMP-owned backing/artifact/resolved paths absent from fields and errors, while user-authored path-like plan text survives unchanged.
  12. Regression coverage documents non-universal enforcement for Bash, xdev, MCP, extensions, custom tools, and subprocesses.
  13. Controller parity coverage against InteractiveMode/ACP for shared transitions, persistence, writer guards, active-to-paused exit, and native approval behavior.
  14. Protocol examples, transition and compatibility tables, targeted test results, and evidence from the local OMP fork/build exposing plan_mode.version = 1.
  15. Real RPC-UI integration runs against that local OMP fork/build and local Paseo build before treating the experiment as complete.

Explicit non-goals

  • ACP transport migration.
  • A provider-agnostic plan-state framework.
  • A universal sandbox or any claim that plan mode blocks Bash, xd:// devices, MCP, extensions, custom tools, or subprocesses.
  • Prompt emulation or implementation-prompt construction in Paseo.
  • --plan-yolo as remote interactive planning.
  • Treating --plan <model> or planModel as plan-mode activation.
  • Filesystem path secrecy for user-authored plan text; only OMP-owned storage metadata is protected.
  • Same-process RPC reconnect, transport reattachment, process-generation handling, or prior-process event replay.
  • Remote selection of Approve and compact context, keep-context execution, model-tier/execution-model selection, or any other native approval branch not explicitly named for v1.
  • A Paseo functional plan UI before the local OMP fork/build exposes plan_mode.version = 1 and local RPC-UI integration has been exercised.

Local experiment sequence and upstream follow-up

  1. User publishes this non-actionable OMP proposal issue for maintainer discussion and the local experiment record. It must not request maintainer/robomp implementation, reserve implementation work, or commit to an upstream PR/release.
  2. User posts the proposal in OMP Discord and states that they will test the local implementation over the next week. This required contribution discussion is not maintainer approval and does not guarantee a later pull request will be merged.
  3. After the user-owned issue and Discord post, implement and build OMP in a local fork/worktree. Keep OMP source, build, and runtime local; no published OMP artifact is required.
  4. Configure and implement a local Paseo build against that local OMP fork/build over rpc-ui; do not require an upstream PR, release, push, or publication.
  5. Run integrated local RPC-UI tests and end-to-end QA, including capability discovery, lifecycle transitions, proposal decisions, handoff recovery, revision ordering, writer guards, and allowed local artifacts.

Record local experiment results afterward. Decide afterward, with the required discussion and maintainer feedback, whether any upstream PR, release, or other contribution is appropriate; those decisions are post-experiment and do not gate local implementation or QA.

The GitHub issue records a design for local experiment and maintainer discussion. It does not reserve implementation work or require maintainers/robomp to implement it.

Activity

  1. roboomp
    added
    cliCLI commands and arguments
    duplicateThis issue or pull request already exists
    sdkSDK and extension integration surface
    triaged
    on Aug 21, 2026
  2. roboomp commented on Aug 21, 2026

    @roboomp
    roboomp
    on Aug 21, 2026
    Collaborator
    More actions

    Marking as duplicate. The underlying capability gap — exposing OMP's native plan mode over the RPC/RPC-UI transport — is already tracked by the open enhancement #5380 ("Add set_mode RPC command to toggle plan mode in headless/RPC mode"), and #8171 was previously ruled a duplicate of the same ask. The RPC surface genuinely lacks plan-mode wiring today (packages/coding-agent/src/modes/rpc/rpc-types.ts has set_fast_mode/set_steering_mode/etc. but no set_plan_mode, and RpcSessionState has no plan field), so the gap is real — but it's the one #5380 already covers.

    There is also active implementation work on this surface worth folding your design notes into rather than opening a parallel track:

    • feat(rpc): add headless plan workflow control #7529 — feat(rpc): add headless plan workflow control (open)
    • feat(coding-agent): expose goal mode in ACP and RPC via shared GoalModeController #8225 — feat(coding-agent): expose goal mode in ACP and RPC via shared GoalModeController (open)
    • feat(rpc): add set_mode command for plan/vibe/goal session modes #8177 / Add runtime RPC plan and approval controls #6080 / RPC v2: add native plan and goal mode controls #5058 — prior attempts at plan/mode-over-RPC controls (closed)

    Since this is explicitly a design proposal for maintainer discussion (and, per the body, for your own local experiment) rather than a bug or an implementation request, the detailed v1 contract here — capability gating, revisioned snapshots, decision dedup keyed on (sessionId, proposalId, decisionId), and handoff/crash-recovery ordering — is best raised on #5380 and in the Discord thread you mention, so the discussion stays consolidated with the existing tracker and the in-flight PRs. Leaving the final call to the maintainer.

  3. github-actions commented on Nov 25, 2026

    @github-actions
    github-actionsBot
    on Nov 25, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue has had no activity for 45 days and is now marked stale. It will be closed in 14 days unless there is a new comment or update. If it still reproduces on the latest release, comment with what you're seeing and it stays open.

  4. github-actions
    added
    stale
    on Nov 25, 2026
  5. roboomp commented on Nov 25, 2026

    @roboomp
    roboomp
    on Nov 25, 2026
    Collaborator
    More actions

    Closed: marked stale with no activity since. If this is still relevant, comment and a maintainer can reopen it.

  6. roboomp
    closed this as not plannedon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI commands and argumentsduplicateThis issue or pull request already existssdkSDK and extension integration surfacestaletriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.