You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(omp): use native RPC for structured chat - #36258
OMP Native Chat now talks directly to OMP's native RPC runtime. Chat, questions, model controls and child-agent progress use Orca's existing chat UI, and saved OMP chats can reopen their original transcript without starting over.
What Changed
Replace OMP's structured-chat ACP registration with --mode rpc-ui; require OMP 18.4.5 or newer. There is no backend preference or automatic ACP fallback. Terminal OMP is unchanged.
Reuse Pi's RPC session lifecycle, process supervision, history import and journal through optional dialect hooks. Add OMP handshake, output chunk reassembly, correlated requests, prompt outcomes and session settlement. Input remains ordinary JSONL, including large prompts.
Map native Ask forms, confirm/select/input/editor dialogs, notifications and cancellation onto existing interactions. Split forms exceeding the host's four-question card limit into bounded cards, accumulate selections locally, and send one complete response to OMP; preserve cancellation and retry semantics. Unsupported blocking, secret and timed Ask requests are explicitly cancelled rather than answered automatically.
Discover models, Thinking levels, Skills and extension commands from OMP. Populate model and command menus before the first send through bounded transient RPC sessions, with command caching scoped to folder/account and cancellation-aware process cleanup. Include full provider/model IDs in the existing description field to distinguish identical display names, expose native Fast mode, and publish OMP child-agent progress through the existing child-work channel.
Connect the existing desktop Goal workflow to OMP's native create/get/pause/resume/drop lifecycle. Keep OMP responsible for continuation and persistence; use an Orca-local launch overlay without changing global OMP configuration. Revise token/time accounting in the existing Goal row instead of appending another identical notice for every native update; retain separate lifecycle transitions.
Reopen saved ACP handles through RPC after checking the native session UUID and working directory. Preserve the original immutable journal identity. Reject builtin relocation commands that would move the agent outside Orca's session ownership.
Normalize OMP's native file-reference messages before the shared message parser so quota errors, subsequent Skill/file-reference prompts and command discovery can continue in the same chat. Keep Pi's wire validation unchanged.
Keep model discovery and successful option writes usable when optional metadata or cleanup fails. Apply per-request deadlines across shared initialization, retain child completion under backpressure, and diagnose malformed child progress while preserving strict lifecycle validation.
Connect the existing Rewind to here action to native navigate_tree, retaining the original session and abandoned branch. Persist native request boundaries in existing turn records, verify the resulting leaf, and recover lost replies by observation without repeating navigation. Refuse unsettled/queued work and navigation that could reactivate a historical Goal. Discover native support without changing the tree; older supported OMP releases retain Chat without Rewind.
Add protocol, lifecycle, legacy-session and renderer regressions plus a real-OMP integration harness. Fix Windows file-URL imports and database cleanup in the mobile test fixtures used for verification.
Existing Native Chat / session journal / process supervisor
-> Pi RPC session lifecycle (optional dialect hooks)
-> OMP rpc-ui framing, interactions, controls and child progress
Why
OMP's native RPC exposes its own interaction and lifecycle evidence directly. Sharing the existing session machinery avoids a second chat store or a parallel execution loop, while the legacy-handle resolver lets existing conversations keep their transcript and journal identity.
Linked Issue
Implements the native RPC transport requested in #22650. That feature issue is already closed; this PR specifically replaces the ACP transport used by OMP structured chat.
Visual Proof
Screenshots supplied by the contributor from local Windows testing. Images are GitHub attachments, not repository files.
Model controls — before and after: the RPC picker retains model names and qualified IDs, exposes Thinking levels, and adds native Fast mode. The after screenshot shows the model catalog before the first message.
Before
After
Goal entry — before and after: the previous command menu has no native Goal entry; RPC connects the existing Goal composer to OMP.
Before
After
Native Ask: grouped questions use Orca's existing interactive cards.
Native subagent progress: OMP child-agent activity appears in the persistent agent panel above the composer.
RPC command output: /mcp output uses the existing information-notice component without Chat stylesheet changes.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Manual validation: the contributor tested Windows development and production builds, supplied the screenshots above, and confirmed the latest 1.4.245 acceptance installer works locally.
Core regressions: OMP/Pi, JSONL RPC, shared session options and OMP renderer options passed: 54 files; 622 passed, with 9 pre-existing skipped tests. Coverage includes child completion under full queues, cleanup failures, malformed optional Fast metadata, successful model/Thinking writes followed by failed discovery, malformed child progress versus lifecycle evidence, legacy host model fallback, and independent request deadlines during shared initialization.
Model-picker regressions: model-description coverage passed (46 files; 534 passed, 8 pre-existing skipped). Coverage for preserving the discovered catalog before the first message, including both response orders and the saved model/Thinking selection, passed (53 files; 629 passed, 8 pre-existing skipped).
RPC-notice regressions: OMP/Pi, projection and notice tests passed (46 files; 626 passed, 8 pre-existing skipped). The adapter suite was rerun with the final command-output assertions (14 passed). These cover existing Chat notice presentation, warning/error severity and complete multiline output without changing Chat components or styles.
Command and interaction coverage: focused OMP/Pi adapter, framing, model catalog, dialog, startup, prompt and option tests passed (10 files; 85 passed). Additional host command-population and renderer command-menu refresh tests passed (2 files; 13 passed). Coverage includes 5- and 9-question Ask forms, cancellation, rejected commits, retry after delivery failure, native withdrawal, close cleanup, pre-send command discovery, folder/account isolation, and commands retained after a quota error and file-reference prompt.
Goal accounting: reproduced the repeated-notice case before the change (13 identical rows from the initial Goal plus 12 usage updates). The regression now keeps one row with current usage; a second regression preserves queued pause/resume/complete/clear transitions and consumes both native Goal events and state observations. 56 tests across four focused OMP files passed, including adapter, options and Rewind coverage; Node typecheck and normal commit checks passed.
Rewind coverage: 102 focused tests passed across eight OMP/Pi, shared-cut/provenance, Codex and renderer-hook files. Real OMP 18.13.3 with an isolated local HTTP refusal fixture passed repeated-text request identity, user-invoked Skill rewind, first-request rewind, restart persistence, abandoned-branch retention, lost-reply observation, real host journal replacement, idempotent operation replay and a new turn after Rewind. No paid inference was used. Node typecheck and normal commit lint/static/format checks passed. Additional existing shared-host suites showed a baseline recovery assertion failure and Windows SQLite EBUSY cleanup failures, reproduced with the original cut implementation; those suites are not counted as passing.
Mobile regressions: focused launch, replay, document and input tests passed under Bun (4 files; 42 passed).
Static validation: root, mobile and mobile-test typechecks, changed-code quality checks and normal pre-commit checks passed. Root typechecks, changed-code quality, formatting/lint and normal pre-commit checks also passed for the review changes. The latest OMP-only changes also passed the Node typecheck and changed-file lint.
Real OMP integration: OMP 18.13.3 with tbt-openai/gpt-6.1-sol passed startup/identity, dynamic extension commands, confirm/select/input/editor/grouped Ask, timeout cancellation, 1.2 MB input, streaming/settlement, model/Thinking/Fast controls, tool execution, model-issued native Ask, native Goal lifecycle and saved ACP-handle resume with retained conversation context.
Local-provider integration: the actual OMP 18.13.3 executable against an isolated local HTTP fixture passed pre-send Skill/builtin/extension discovery, a 403 quota response with the command catalog retained, /tools after the rejection, a subsequent Skill plus file-reference prompt, five-question Ask submission as one native response, and cancellation on the second card. No paid provider requests were used for this run.
Older OMP compatibility: real runs against 18.4.5 and 18.8.0 passed before the final upstream sync, using older-UI expectations where applicable. Unavailable native Goal controls are reported explicitly.
Build and packaging: production build and Windows NSIS packaging passed with native Rewind and the Goal accounting revision in 7d8db00e75. The packaged version and all 259 JavaScript runtime files were verified against the build output; local validation data and the OMP source checkout are excluded. The local acceptance installer is 1.4.245; release metadata and build artifacts are not part of the contribution.
Validation limits: Pi automated regressions passed; a real Pi conversation was not run because the installed Pi 0.75.5 is below Orca's existing 0.84.0 minimum. Physical iOS, agent-run Electron UI automation, macOS/Linux, SSH/WSL and multi-repo orchestration end-to-end behavior remain unverified locally.
Reproduce the core regression selection:
ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/omp src/main/pi src/main/jsonl-rpc src/shared/structured-agent-session-options.test.ts src/shared/structured-agent-session-model-catalog-application.test.ts src/renderer/src/components/native-chat/use-structured-agent-session-options-omp.test.tsx --maxWorkers=2
Reproduce real OMP integration: configure an isolated validation account with the authorized model and ORCA_BACKGROUND_LAUNCH=1, keeping its home and PI_CODING_AGENT_DIR inside the validation directory. Do not use the production account directory. Run:
Implemented and reviewed with OpenAI Codex, a GPT-6-based coding agent, with scope and local testing directed by the contributor.
Author X/Twitter handle: not provided.
Review
Cross-platform: production launches reuse the existing command/environment/process wrappers and path comparison. Windows build and integration are verified; other operating systems need CI or reviewer coverage.
Local/SSH/remote: reuse existing launch composition and remote transport; no new client-only RPC channel. Saved handles retain agent/account checks. Mixed-version clients and remote execution were considered but not exercised end to end.
Other agents/integrations: Pi keeps its default wire behavior unless a dialect hook is provided. OMP and Pi regressions passed. Codex/Claude implementations and the orchestration scheduler are unchanged; real conversations with those providers were not exercised.
Performance: validate and bound output chunk reassembly; route child evidence through the existing ordered/backpressured timeline lane. No unbounded transcript polling or parallel session state store is introduced.
UI/security: reuse existing cards, model menu and child-work presentation. Cancel unrepresentable requests; do not auto-approve. Validate legacy transcript identity/cwd and preserve ownership boundaries. No credentials, local account configuration or validation artifacts are included. Contributor-supplied visual proof is attached above.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
This adapts existing OMP RPC to Orca's existing Native Chat workflows; it does not claim full TUI parity. OMP source and installed extensions are unchanged. There is no new Plan UI, guided-goal workflow, goal objective/budget editing UI, mobile Goal control UI, full session-tree/fork browser, arbitrary terminal renderer or native child-agent cancellation UI. Unsupported requests are reported or cancelled explicitly. Native subagents remain distinct from Orca orchestration workers.
Rewind uses native conversation navigation and does not restore files on disk. The actual 18.4.5 binary lacks navigate_tree and reports Rewind unsupported; 18.13.3 supports it. Imported native request entries use their persistent entry IDs. Earlier live Orca turns without a recorded native boundary are refused instead of matched by text. Existing mobile clients have no Rewind control; no new mobile UI is introduced.
The OMP minimum changes from the ACP admission range to 18.4.5. Older installations must upgrade; saved chats use their existing native transcript over RPC rather than a hot transport migration.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
The change is one transport feature across shared infrastructure, OMP adaptation and regression coverage. The validation performed is listed above. The validation checklist is checked under its "CI will cover" clause: local OMP/Pi regressions, root/mobile typechecks, staged lint/static checks, production build and Windows packaging passed; the upstream PR workflow will cover the repository checks after marking this PR ready for review. CI success remains pending.
Add OMP rpc-ui framing, handshake and settlement on the existing Pi RPC
session lifecycle, journal and process supervisor. Project native Ask,
Goal, model/Thinking/Fast controls, discovered commands and child-agent
progress into the existing chat workflows.
Resume saved OMP ACP handles against their native session files while
preserving immutable journal identity. Require OMP 18.4.5 or newer and
cancel interactions the host cannot represent without inventing answers.
Cover OMP and Pi regressions, mobile replay and real OMP RPC integration.
An at-rest options answer may name a saved model without listing any models. Keep that answer from replacing or blocking the discovered catalog, regardless of response ordering, while preserving the saved model and effort.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
The change adds an OMP JSON-RPC runtime with connection, launch and resume handling, dialogs, session options, Goal updates, subagent reporting, rewind support, and model catalog discovery. It extends shared Pi RPC code with dialect hooks, agent-aware history, prompt correlation, and child-work evidence. Runtime registration and native-chat options now include OMP support. The change also updates mobile test cleanup and generator imports.
Merge Risk: Low · previous review fa7fe
Option reads no longer contact OMP. A remaining notification-ordering edge case can reject a chat dispatch or Goal operation; preserve pending write tokens to remove this bounded risk.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 21.88% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely identifies the main change: replacing OMP structured-chat transport with native RPC.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is mostly complete. It covers the required change, rationale, linked issue, visual proof, testing, AI disclosure, review considerations, and checklist. It also explains the broad scope…
Full details: Description check
Explanation
The description is mostly complete. It covers the required change, rationale, linked issue, visual proof, testing, AI disclosure, review considerations, and checklist. It also explains the broad scope and identifies validation limits and pending CI.
Full details: Docstring Coverage
Explanation
Docstring coverage is 21.88% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 32 functions across 67 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 92036348-b294-485e-a70d-a2105e13b9b8
Commits
Reviewing files that changed from the base of the PR and between 64b6320 and a286ec9.
Files selected for processing: 4
src/main/omp/rpc-connection.ts
src/main/pi/rpc-session-adapter.ts
src/main/pi/rpc-session-contract.ts
src/main/pi/rpc-session.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Keep optional metadata, refresh, and cleanup failures from replacing valid results. Preserve child lifecycle evidence under backpressure, diagnose malformed progress, and retain legacy model fallbacks. Add regressions for all seven review findings.
Discover native commands and Skills before the first message through the
existing at-rest catalog, reusing bounded OMP model discovery sessions.
Normalize file-reference events for the shared RPC message lane while
preserving Pi's protocol validation.
Collect larger native Ask forms through bounded existing question cards
and deliver one complete response, including cancellation and retry
handling. Cover quota recovery, command retention and discovery cleanup.
Validate focused OMP/Pi and command-menu tests, Node types, changed-file
lint, real OMP with an isolated local provider, and Windows packaging.
The contributor confirmed the 1.4.245 acceptance build works locally.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Keep readOptions memory-only. · rpc-session-adapter.ts:212-215
src/main/omp/rpc-session-adapter.ts:212-215 Minor · Stability & Availability · Quick win
Keep readOptions memory-only.
session.readOptions() projects held observations, but readOmpFastOptions calls rpc.request('get_state') on every OMP options read. A rejected request can reject the full read. The response also emits an omp_state frame, which can fail the session when its session file differs.
Return the unenriched options when get_state fails, or derive Fast mode from the values already held in session.selected.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c1aac360-4ba4-403c-9dea-577565a8d7b5
Commits
Reviewing files that changed from the base of the PR and between 5ae4c3d and ca4aa8a.
Files selected for processing: 9
src/main/omp/rpc-ask-groups.ts
src/main/omp/rpc-at-rest-commands.test.ts
src/main/omp/rpc-at-rest-commands.ts
src/main/omp/rpc-catalog-session.ts
src/main/omp/rpc-dialogs.ts
src/main/omp/rpc-model-catalog-probe.ts
src/main/omp/rpc-runtime-registration.ts
src/main/omp/rpc-session-adapter.test.ts
src/main/omp/rpc-session-adapter.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Live OMP option reads now project per-connection held Fast metadata. They do not issue get_state or any other RPC request.
Normal startup/configuration/model observations populate that metadata; successful set_fast_mode replies supply the native enabled and active values. We do not infer effective Fast mode from the requested preference.
Pending writes, superseded observations, and model identity checks prevent stale state replies from overwriting newer controls or decorating a different model. Existing session-file identity protection remains intact.
The independent model catalog probe retains its explicit native discovery and transport error reporting. Pi's shared implementation is unchanged.
Validation:
Reproduced the original failure with a live-adapter regression test before the change; that test now passes and asserts zero RPC calls during option reads.
79 focused OMP/Pi tests passed across seven files, including delayed/out-of-order state observations, rejected controls, native Fast results, and model changes.
pnpm tc:node and the normal commit lint/format checks passed.
Actual OMP 18.13.3 integration passed using an isolated workspace/account: startup Fast metadata, request-free reads with an injected unavailable state transport, native Fast toggles, /fast off, and model switching. No model inference request was needed.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Refresh Fast metadata after Goal option writes. · rpc-session-adapter.ts:240-264
src/main/omp/rpc-session-adapter.ts:240-264 Minor · Functional Correctness · Quick win
Refresh Fast metadata after Goal option writes.
A successful set_model clears the held Fast metadata. The Goal path then calls goal without a get_state refresh. Subsequent option reads can therefore retain Fast metadata from the previous model instead of reflecting the selected model.
Refresh options after successful Goal option writes. Catch refresh errors, as the existing option-write path does, so a catalog failure does not fail the Goal operation.
Suggested fix
for (const key of ['model', 'effort'] as const) {
const value = input.executionOptions?.[key]
if (value !== undefined) {
await applyPiRpcSessionOption(
session.connection,
@@
session.optionProof
)
}
}
+ if (+ input.executionOptions?.model !== undefined ||+ input.executionOptions?.effort !== undefined+ ) {+ await session.refreshOptions().catch((error: unknown) =>+ this.deps.logger.warn('OMP options could not be refreshed after a Goal write', {+ scope: 'omp-rpc',+ sessionId: input.sessionId,+ error+ })+ )+ }
const change = input.change
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 732d17ac-71e6-40e2-97fc-40742e58f6e7
Commits
Reviewing files that changed from the base of the PR and between ca4aa8a and ad28a13.
Files selected for processing: 4
src/main/omp/rpc-options.test.ts
src/main/omp/rpc-options.ts
src/main/omp/rpc-session-adapter.test.ts
src/main/omp/rpc-session-adapter.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@0xff26b9a8 Thanks. The inspected code and regression assertions support the fix for Keep readOptions memory-only.
The live adapter projects per-connection held Fast metadata.
OmpRpcFastOptions.read() makes no RPC requests.
Native enabled and active values remain separate.
Pending-write, revision, and model-identity checks prevent stale metadata from being projected.
The live-adapter regression asserts zero RPC calls when get_state is unavailable.
This addresses my concern. I inspected the code and test assertions; I did not rerun the tests or integration harness.
✏️ Learnings added
Learnt from: 0xff26b9a8
URL: https://github.com/stablyai/orca/pull/36258
Timestamp: 2026-10-30T09:51:14.652Z
Learning: Within repository "stablyai/orca", only for files matching one of ["src/main/omp/rpc-session-adapter.ts","src/main/omp/rpc-options.ts"]: When reviewing live OMP option reads in src/main/omp/rpc-session-adapter.ts or Fast metadata projection in src/main/omp/rpc-options.ts, check that readOptions projects per-connection held metadata without issuing get_state or any other RPC request. Check that Fast preference and effective state come from native observations or successful set_fast_mode replies, not from the requested preference, and that pending writes, superseded observations, and model-identity checks prevent stale or mismatched projection. This memory-only requirement applies to live option reads, not the independent model catalog probe, which retains explicit native discovery and transport error reporting.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
If you found this review helpful, would you consider giving us a shout-out on X?
@coderabbitai Addressed Refresh Fast metadata after Goal option writes in c62dd58, together with the related execution-choice paths.
Goal model/Thinking writes now use the same OMP option setter as the model picker. Each successful write refreshes held options, so a subsequent rejected Thinking choice does not leave a successful model change without Fast metadata.
Optional catalog/state refresh failures are logged without rejecting the Goal operation or replaying an accepted message. Actual control failures still prevent execution.
The related audit found that message-dispatch option writes also needed this synchronization, and that carried Fast choices were not being applied. An optional dialect writer reuses the existing prompt validation, option refusal handling, and pre-send ordering. Pi retains its default writer.
OMP applies each message's carried Fast choice through set_fast_mode and records it in execution evidence. This is necessary because native /fast can change the preference without a config_update event. Native configuration events invalidate previous control proofs before refresh.
Live option reads remain memory-only; session-file identity protection is unchanged.
Validation:
Reproduced the missing Goal/dispatch Fast metadata and ignored carried Fast choice before the changes.
107 focused OMP/Pi tests passed across ten files, covering Goal/model/Thinking/Fast writes, partial failures, discovery failures, dispatch refusals, execution ordering, native configuration changes, and request-free option reads.
pnpm tc:node and normal commit lint/format checks passed.
Actual isolated OMP 18.13.3 integration passed for Goal execution-model changes, an injected optional state-refresh failure, dispatch model changes, message/Goal Fast choices, /fast, and model switching. No model inference request was needed.
@0xff26b9a8 Thanks. The inspected diff in c62dd58227 and its regression assertions support the fix for Refresh Fast metadata after Goal option writes.
Goal and dispatch execution choices use the OMP option setter.
Each successful model or Thinking write refreshes held options before the next write. A later rejected Thinking write therefore does not skip the model refresh.
Optional refresh failures are logged without failing the accepted control. Actual control failures still prevent execution.
Dispatch applies each carried Fast choice through set_fast_mode before sending the prompt and records the choice in ranOptions.
Native configuration events invalidate previous control proofs. Pi retains its default writer.
I also checked the changes against the existing memory-only live-read guidance. The new regression explicitly asserts that a subsequent readOptions call issues no RPC requests.
This addresses my concern. I inspected the code and test assertions; I did not rerun the reported 107 tests or the OMP integration harness.
✏️ Learnings added
Learnt from: 0xff26b9a8
URL: https://github.com/stablyai/orca/pull/36258
Timestamp: 2026-10-30T10:08:27.029Z
Learning: Within repository "stablyai/orca", only for files matching one of ["src/main/omp/rpc-session-adapter.ts"]: When reviewing OMP Goal or message-dispatch execution-option writes in src/main/omp/rpc-session-adapter.ts, check that successful model and effort writes synchronize held options individually before a later choice can fail. A rejected subsequent choice must not skip synchronization for an already successful write. Optional catalog or state refresh failures must be logged without converting a successful control into a failed Goal operation or causing an accepted message to be replayed; actual control failures must still prevent execution. Keep this write-side refresh separate from live readOptions calls, which remain memory-only.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: 0xff26b9a8
URL: https://github.com/stablyai/orca/pull/36258
Timestamp: 2026-10-30T09:51:16.759Z
Learning: Within repository "stablyai/orca", only for files matching one of ["src/main/omp/rpc-session-adapter.ts","src/main/omp/rpc-options.ts"]: When reviewing live OMP option reads in src/main/omp/rpc-session-adapter.ts or Fast metadata projection in src/main/omp/rpc-options.ts, check that readOptions projects per-connection held metadata without issuing get_state or any other RPC request. Check that Fast preference and effective state come from native observations or successful set_fast_mode replies, not from the requested preference, and that pending writes, superseded observations, and model-identity checks prevent stale or mismatched projection. This memory-only requirement applies to live option reads, not the independent model catalog probe, which retains explicit native discovery and transport error reporting.
Thanks for confirming that the Goal/Fast synchronization concern is addressed.
Added the requested OMP conversation Rewind support in fa7fe93:
Reuse the existing Native Chat action and host rewind journal; no Chat styling changes or OMP modifications.
Navigate the same native session using verified request identity, retain abandoned branches, and verify the native parent leaf before replacing Orca history.
Recover lost replies without repeating navigation. Refuse active/queued work, active Goals, historical Goal reactivation, and ambiguous request identities.
Discover native support safely: the actual 18.13.3 binary supports navigation; the actual 18.4.5 binary does not. Earlier live turns without a recorded boundary are refused rather than guessed. This rewinds conversation context, not disk changes.
Validation: 102 focused OMP/Pi, shared rewind, Codex and renderer-hook tests passed; Node typecheck and normal commit checks passed. Actual isolated OMP 18.13.3 integration passed native navigation, Skill requests, restart persistence, first-request rewind, real host history replacement, duplicate-operation replay and continued conversation after Rewind. The local HTTP fixture required no paid inference.
Production build and Windows NSIS packaging also passed. The local acceptance installer is 1.4.245; its packaged version and all 259 main-runtime JavaScript files were verified, with no private validation inputs included.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Sources consulted:
- oh-my-pi/docs/rpc.md at main · can1357/oh-my-pi · GitHub — https://github.com/can1357/oh-my-pi/blob/main/docs/rpc.md
- oh-my-pi/python/omp-rpc/src/omp_rpc/client.py at main · can1357/oh-my-pi · GitHub — https://github.com/can1357/oh-my-pi/blob/main/python/omp-rpc/src/omp_rpc/client.py
- oh-my-pi/docs/models.md at main · can1357/oh-my-pi · GitHub — https://github.com/can1357/oh-my-pi/blob/main/docs/models.md
- UNPKG — https://app.unpkg.com/%40oh-my-pi/pi-coding-agent%4018.4.8/files/src/session/model-controls.ts
- oh-my-pi/docs/settings.md at main · can1357/oh-my-pi · GitHub — https://github.com/can1357/oh-my-pi/blob/main/docs/settings.md
- …and 10 more
Preserve pending option-write tokens during config_update.
If OMP emits config_update before an option reply, replacing the pending token causes the writer to throw its superseded error. This can reject dispatch before it sends the prompt or reject a Goal operation.
Keep pending tokens unchanged and invalidate only settled tokens.
Suggested fix
--- "a/src/main/omp/rpc-notifications.ts"+++ "b/src/main/omp/rpc-notifications.ts"@@ -8,10 +8,12 @@
export function receiveOmpNotification(frame: JsonlRpcRecord, session: PiRpcSession): boolean {
if (frame.type === 'config_update') {
for (const key of ['model', 'effort', 'fastMode']) {
session.optionProof.current.delete(key)
- session.optionProof.writes.set(key, { pending: false })+ if (!session.optionProof.writes.get(key)?.pending) {+ session.optionProof.writes.set(key, { pending: false })+ }
}
void session.refreshOptions().catch(() => {
receiveOmpNotification(
{
Committable suggestion
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Native Goal updates change usage counters and timestamps while the objective and lifecycle status stay the same. The adapter previously included those accounting fields in the identity of each new closed status row, producing repeated identical Goal notices throughout execution.
Accounting-only updates now revise the existing row through the shared timeline. Native Goal identity, objective or lifecycle changes still create distinct records, including pause, resume, completion and clear. An occurrence counter keeps repeated lifecycle transitions distinct even when native timestamps coincide. OMP remains responsible for execution and persistence; Chat components and styles are unchanged. Previously recorded notices are retained.
Validation: reproduced 13 identical rows before the change; the regression now retains one row with the latest usage. Queued lifecycle transitions and native state observations are also covered. All 56 focused OMP adapter/options/Rewind tests, Node typecheck and normal commit lint/static/format checks passed.
Production build and Windows NSIS packaging passed. The local 1.4.245 acceptance installer includes this change and native Rewind; the packaged version and all 259 main-runtime JavaScript files match the build output, with no private validation inputs included.
Carry sessionless model discovery into the extracted catalog lookup and retain dynamic command hints. Project only canonical Goal fields so native state remains persistable under the updated journal validation.
Copy saved conversations with an isolated native fork, preserving the chat writer and preventing inherited Goal execution during preparation. Validate copied identities and retain unproven children for cleanup. Cover RPC and legacy ACP handles with regression tests and real OMP copy/resume checks.
Thanks for all the work on this! OMP's questions in chat (Ask forms, multi-select and batches) are now handled in #38684, which just merged, so we're closing this one.
Thanks for all the work on this! OMP's questions in chat (Ask forms, multi-select and batches) are now handled in #38684, which just merged, so we're closing this one.
I reviewed #38684. This PR appears to address OMP Ask only through ACP:
advertising elicitation.form
mapping OMP Ask requests to ACP form interactions
handling cancellation and session cleanup
This is useful for OMP ACP support, but it does not cover several OMP-native capabilities that are already exposed by the OMP RPC protocol, including:
Goal lifecycle (create, pause, resume, drop, status and usage)
Fast mode
Subagent lifecycle, progress, messages and cancellation
Background Bash / Eval / Service jobs
Steering, follow-up and queued-message controls
Native command execution
Session tree navigation and rewind
There is also an important behavioral difference. ACP commands are generally text-based. Some commands become transcript messages, and TUI-only commands such as /goal, /guided-goal and /tree are not exposed through ACP at all. RPC represents these operations as structured requests and events, so they do not need to be injected into the conversation transcript.
This raises a broader integration question: Pi already has a native RPC adapter in Orca, while OMP integration is still being extended through ACP. Since OMP RPC exposes substantially more of OMP’s native runtime, is ACP intentionally being kept as the primary integration path for compatibility, with RPC reserved for a separate adapter? For Native Chat feature parity, OMP RPC seems to be the more appropriate backend, while ACP could remain as a standards-based fallback.
I would also encourage a careful re-review of the RPC integration before treating ACP as the primary OMP path. I use OMP extensively and tested both approaches in Orca. In my experience, the ACP integration feels noticeably awkward in Native Chat, especially around command handling and runtime state. After switching to the RPC backend, the interaction felt substantially smoother and more consistent with OMP’s native behavior.
This is only my user experience, but as a heavy OMP user I would appreciate it if the RPC option could be reconsidered seriously before the integration direction is finalized.
Could you clarify whether #38684 is intentionally limited to ACP Ask, and whether the remaining OMP-native capabilities are expected to be handled through the RPC protocol?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
OMP Native Chat now talks directly to OMP's native RPC runtime. Chat, questions, model controls and child-agent progress use Orca's existing chat UI, and saved OMP chats can reopen their original transcript without starting over.
What Changed
--mode rpc-ui; require OMP 18.4.5 or newer. There is no backend preference or automatic ACP fallback. Terminal OMP is unchanged.navigate_tree, retaining the original session and abandoned branch. Persist native request boundaries in existing turn records, verify the resulting leaf, and recover lost replies by observation without repeating navigation. Refuse unsettled/queued work and navigation that could reactivate a historical Goal. Discover native support without changing the tree; older supported OMP releases retain Chat without Rewind.Why
OMP's native RPC exposes its own interaction and lifecycle evidence directly. Sharing the existing session machinery avoids a second chat store or a parallel execution loop, while the legacy-handle resolver lets existing conversations keep their transcript and journal identity.
Linked Issue
Implements the native RPC transport requested in #22650. That feature issue is already closed; this PR specifically replaces the ACP transport used by OMP structured chat.
Visual Proof
Screenshots supplied by the contributor from local Windows testing. Images are GitHub attachments, not repository files.
Model controls — before and after: the RPC picker retains model names and qualified IDs, exposes Thinking levels, and adds native Fast mode. The after screenshot shows the model catalog before the first message.
Goal entry — before and after: the previous command menu has no native Goal entry; RPC connects the existing Goal composer to OMP.
Native Ask: grouped questions use Orca's existing interactive cards.
Native subagent progress: OMP child-agent activity appears in the persistent agent panel above the composer.
RPC command output: /mcp output uses the existing information-notice component without Chat stylesheet changes.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Manual validation: the contributor tested Windows development and production builds, supplied the screenshots above, and confirmed the latest 1.4.245 acceptance installer works locally.
Core regressions: OMP/Pi, JSONL RPC, shared session options and OMP renderer options passed: 54 files; 622 passed, with 9 pre-existing skipped tests. Coverage includes child completion under full queues, cleanup failures, malformed optional Fast metadata, successful model/Thinking writes followed by failed discovery, malformed child progress versus lifecycle evidence, legacy host model fallback, and independent request deadlines during shared initialization.
Model-picker regressions: model-description coverage passed (46 files; 534 passed, 8 pre-existing skipped). Coverage for preserving the discovered catalog before the first message, including both response orders and the saved model/Thinking selection, passed (53 files; 629 passed, 8 pre-existing skipped).
RPC-notice regressions: OMP/Pi, projection and notice tests passed (46 files; 626 passed, 8 pre-existing skipped). The adapter suite was rerun with the final command-output assertions (14 passed). These cover existing Chat notice presentation, warning/error severity and complete multiline output without changing Chat components or styles.
Command and interaction coverage: focused OMP/Pi adapter, framing, model catalog, dialog, startup, prompt and option tests passed (10 files; 85 passed). Additional host command-population and renderer command-menu refresh tests passed (2 files; 13 passed). Coverage includes 5- and 9-question Ask forms, cancellation, rejected commits, retry after delivery failure, native withdrawal, close cleanup, pre-send command discovery, folder/account isolation, and commands retained after a quota error and file-reference prompt.
Goal accounting: reproduced the repeated-notice case before the change (13 identical rows from the initial Goal plus 12 usage updates). The regression now keeps one row with current usage; a second regression preserves queued pause/resume/complete/clear transitions and consumes both native Goal events and state observations. 56 tests across four focused OMP files passed, including adapter, options and Rewind coverage; Node typecheck and normal commit checks passed.
Rewind coverage: 102 focused tests passed across eight OMP/Pi, shared-cut/provenance, Codex and renderer-hook files. Real OMP 18.13.3 with an isolated local HTTP refusal fixture passed repeated-text request identity, user-invoked Skill rewind, first-request rewind, restart persistence, abandoned-branch retention, lost-reply observation, real host journal replacement, idempotent operation replay and a new turn after Rewind. No paid inference was used. Node typecheck and normal commit lint/static/format checks passed. Additional existing shared-host suites showed a baseline recovery assertion failure and Windows SQLite
EBUSYcleanup failures, reproduced with the original cut implementation; those suites are not counted as passing.Mobile regressions: focused launch, replay, document and input tests passed under Bun (4 files; 42 passed).
Static validation: root, mobile and mobile-test typechecks, changed-code quality checks and normal pre-commit checks passed. Root typechecks, changed-code quality, formatting/lint and normal pre-commit checks also passed for the review changes. The latest OMP-only changes also passed the Node typecheck and changed-file lint.
Real OMP integration: OMP 18.13.3 with
tbt-openai/gpt-6.1-solpassed startup/identity, dynamic extension commands, confirm/select/input/editor/grouped Ask, timeout cancellation, 1.2 MB input, streaming/settlement, model/Thinking/Fast controls, tool execution, model-issued native Ask, native Goal lifecycle and saved ACP-handle resume with retained conversation context.Local-provider integration: the actual OMP 18.13.3 executable against an isolated local HTTP fixture passed pre-send Skill/builtin/extension discovery, a 403 quota response with the command catalog retained,
/toolsafter the rejection, a subsequent Skill plus file-reference prompt, five-question Ask submission as one native response, and cancellation on the second card. No paid provider requests were used for this run.Older OMP compatibility: real runs against 18.4.5 and 18.8.0 passed before the final upstream sync, using older-UI expectations where applicable. Unavailable native Goal controls are reported explicitly.
Build and packaging: production build and Windows NSIS packaging passed with native Rewind and the Goal accounting revision in
7d8db00e75. The packaged version and all 259 JavaScript runtime files were verified against the build output; local validation data and the OMP source checkout are excluded. The local acceptance installer is 1.4.245; release metadata and build artifacts are not part of the contribution.Validation limits: Pi automated regressions passed; a real Pi conversation was not run because the installed Pi 0.75.5 is below Orca's existing 0.84.0 minimum. Physical iOS, agent-run Electron UI automation, macOS/Linux, SSH/WSL and multi-repo orchestration end-to-end behavior remain unverified locally.
Reproduce the core regression selection:
ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/omp src/main/pi src/main/jsonl-rpc src/shared/structured-agent-session-options.test.ts src/shared/structured-agent-session-model-catalog-application.test.ts src/renderer/src/components/native-chat/use-structured-agent-session-options-omp.test.tsx --maxWorkers=2Reproduce real OMP integration: configure an isolated validation account with the authorized model and
ORCA_BACKGROUND_LAUNCH=1, keeping its home andPI_CODING_AGENT_DIRinside the validation directory. Do not use the production account directory. Run:Add
--legacy-uifor older supported releases.AI Disclosure
Implemented and reviewed with OpenAI Codex, a GPT-6-based coding agent, with scope and local testing directed by the contributor.
Author X/Twitter handle: not provided.
Review
Agent skill upstream boundary
Notes
This adapts existing OMP RPC to Orca's existing Native Chat workflows; it does not claim full TUI parity. OMP source and installed extensions are unchanged. There is no new Plan UI, guided-goal workflow, goal objective/budget editing UI, mobile Goal control UI, full session-tree/fork browser, arbitrary terminal renderer or native child-agent cancellation UI. Unsupported requests are reported or cancelled explicitly. Native subagents remain distinct from Orca orchestration workers.
Rewind uses native conversation navigation and does not restore files on disk. The actual 18.4.5 binary lacks
navigate_treeand reports Rewind unsupported; 18.13.3 supports it. Imported native request entries use their persistent entry IDs. Earlier live Orca turns without a recorded native boundary are refused instead of matched by text. Existing mobile clients have no Rewind control; no new mobile UI is introduced.The OMP minimum changes from the ACP admission range to 18.4.5. Older installations must upgrade; saved chats use their existing native transcript over RPC rather than a hot transport migration.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)The change is one transport feature across shared infrastructure, OMP adaptation and regression coverage. The validation performed is listed above. The validation checklist is checked under its "CI will cover" clause: local OMP/Pi regressions, root/mobile typechecks, staged lint/static checks, production build and Windows packaging passed; the upstream PR workflow will cover the repository checks after marking this PR ready for review. CI success remains pending.