Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 6 remain after this review. 📝 WalkthroughWalkthroughOMP Merge Risk: ⚪ Minimal · up to The change updates OMP status handling to distinguish continuations from final agent completion while preserving existing Pi and Prime Agent behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
Hey @bbingz 👋 I'm having the same issue you are fixing here 👍 I tested your changes manually by building and running Orca locally with OMP. The The fix that worked was to keep your OMP-specific Would you be interested in a new commit on your PR with the generic runtime fix and regression tests? |
ELI5
OMP can emit
agent_endboth when a turn is truly finished and when it has already scheduled an automatic retry or continuation. Orca was guessing fromctx.isIdle(), which can remain false and leave the tab permanently marked as running. OMP now supplies the exactwillContinuesignal, so Orca can keep working status only for real continuations and mark the final end immediately.What Changed
agent_end.willContinue === trueas non-terminal and keep the pane working.falseor an absent field as the final boundary and post Orca'sagent_endimmediately, without waiting forctx.isIdle().agent_settled/ bounded idle fallback unchanged for Pi and Prime Agent.Why
OMP's official
AgentEndEventdocumentswillContinue: trueas an automatic continuation that subscribers must not treat as a user-visible settle. The field is optional, so treating absence as final preserves compatibility with older OMP releases. Using this event contract removes the mutable-idle race instead of extending a polling timeout or adding a renderer-wide heuristic.Linked Issue
Fixes #14879
Visual Proof
N/A — this changes generated agent-status hook behavior, not renderer layout or styling. The reporter's stuck-running before state is attached to #14879; the final status transition is covered by the generated-extension event harness.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
TDD RED: the new OMP cases failed 4/4 before the handler change (continuations incorrectly posted done; final events with non-idle context never posted done)
pnpm exec vitest run --config config/vitest.config.ts src/main/pi/agent-status-extension-source.test.ts— 36/36 passedpnpm exec vitest run --config config/vitest.config.ts src/main/pi— 3 files, 66/66 passedOMP hook-boundary suites — 3 files, 24/24 passed
Direct full Vitest — 5,739 files and 53,499 tests passed; only 2 pre-existing
src/main/daemon/node-pty-fd-leak.test.tscases failed because this Node 24 checkout is not using the repository's expected patched nativenode-ptybehaviorpnpm run typecheck— passedpnpm run lint— passed, including 85 reliability gates, max-lines, bundled-skill, and localization checkspnpm build— passed, including desktop, relay, CLI, Electron/Vite, web projection, and native macOS buildsfocused formatting and
git diff --check— passedpnpm testwas not separately rerun because its native preflight is blocked by the same patchednode-ptymismatch demonstrated by the two direct-suite failures above.AI Disclosure
OpenAI Codex diagnosed, implemented, and verified the change against Orca's current source and OMP's official event contract. Grok 4.5 independently reviewed the final state-machine diff for compatibility, timer cleanup, runtime routing, and Pi/Prime isolation and returned
PASS.Review
willContinuesettle immediately as they historically did; current OMP continuations are suppressed only for exact booleantrue; Pi and Prime retain their existing fallback.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author