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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughOMP status handlers now emit tool approval request and resolution events with tool and approval data. OMP 🚥 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/main/pi/agent-status-extension-source.test.ts (2)
377-386: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest the approval resolution event.
Add a
tool_approval_resolveddispatch and assert itstool_name,approved, andreasonpayload. The listener restoresworkingstate only after this event. A source regression can otherwise leave an OMP pane blocked without failing this test.Proposed test addition
+ await harness.callHook('tool_approval_resolved', { + toolName: 'bash', + approved: true, + reason: 'Runs an external command' + }) + await vi.waitFor(() => expect(harness.fetchMock).toHaveBeenCalledTimes(3)) + expect(JSON.parse(String(harness.fetchMock.mock.calls[2]?.[1]?.body)).payload).toEqual({ + hook_event_name: 'tool_approval_resolved', + tool_name: 'bash', + approved: true, + reason: 'Runs an external command' + })
861-873: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest an absent
willContinuevalue.Add an
agent_endevent withoutwillContinueand expect one completion post. The required terminal condition iswillContinue !== true. The current test would not detect a regression that only completes forwillContinue === false.Proposed test addition
await harness.callHook('agent_end', { willContinue: true }, context) expect(harness.fetchMock).not.toHaveBeenCalled() + await harness.callHook('agent_end', {}, context) + await vi.waitFor(() => expect(harness.fetchMock).toHaveBeenCalledTimes(1)) + await harness.callHook('agent_end', { willContinue: false }, context) - await vi.waitFor(() => expect(harness.fetchMock).toHaveBeenCalledTimes(1)) + expect(harness.fetchMock).toHaveBeenCalledTimes(1)
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: fb1bb598-6427-4c81-b2fd-9680dc7c20c6
📒 Files selected for processing (4)
src/main/pi/agent-status-extension-source.test.tssrc/main/pi/agent-status-handler-source.tssrc/shared/agent-hook-listener.test.tssrc/shared/agent-hook-listener.ts
There was a problem hiding this comment.
Pull request overview
Fixes Orca’s OMP agent status reporting so terminal/interactive states are correctly surfaced, using OMP’s documented agent_end.willContinue signal and forwarding OMP interactive/approval lifecycle events while preserving existing Pi/Prime fallback behavior.
Changes:
- Treat OMP
agent_endas terminal only whenwillContinue !== true, avoiding “stuck working” status. - Publish OMP
asktool payloads as interactive prompts (same{ questions }envelope used elsewhere). - Forward OMP
tool_approval_requested/tool_approval_resolvedinto Orca’s blocked/working state model and interactive prompt envelope.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/shared/agent-hook-listener.ts | Normalizes OMP ask into interactive prompts and maps OMP approval request/resolution events into tool snapshots + blocked/working states. |
| src/shared/agent-hook-listener.test.ts | Adds coverage for OMP approval blocked→working transitions and verifies OMP ask now publishes an interactive prompt. |
| src/main/pi/agent-status-handler-source.ts | Emits OMP approval lifecycle hook posts and uses agent_end.willContinue to decide whether to post terminal agent_end. |
| src/main/pi/agent-status-extension-source.test.ts | Verifies approval event posting and adds coverage ensuring only terminal OMP agent_end is reported (configured + runtime-routed). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Cross-linking #13891 / #13890 because these fixes cover complementary layers of the same OMP stuck-working failure. In our Windows + WSL2 reproduction with OMP 17.2.14, the pane could remain working after OMP returned to its prompt. #14279 addresses the authoritative hook path: terminal #13891 addresses the fallback/cleanup path that remains relevant even with this PR:
There is no production-file overlap between the lifecycle handler here and #13891; only |
|
Completing the OMP status cross-links: #13891 and #13923 are competing implementations for the separate #13890 WSL/ConPTY native-title and stale-spinner root cause. This PR and #14330 remain the competing implementations for #14278 ( These pairs are complementary across distinct roots. Please choose the preferred implementation within each pair and prioritize landing the fixes; users are currently seeing the same disruptive stuck/misreported OMP status from both paths. |
|
Closing as superseded by #15713, which states: "Supersedes #14279 for these remaining gaps. Thanks to @devatnull — the diagnosis that ask/approval/identity are missing from the OMP hook path is carried forward ( |
ELI5
Orca now treats OMP as OMP consistently. It shows completion, questions, and approval waits at the correct time.
What Changed
agent_end.willContinuesignal.askpayloads as interactive prompts.Why
OMP does not expose the
agent_settledevent Orca expected. Its live hook identity could also be overwritten by the less-specific Pi-compatible owner identity. The fix uses OMP's documented lifecycle events and makes OMP the stable identity within that compatibility pair.Linked Issue
Fixes #14278
Visual Proof
N/A. The change is in generated hook delivery and status normalization. It is verified at those behavior seams without changing rendered layout.
Testing
Verified on macOS:
pnpm exec vitest run src/shared/agent-detection.test.ts src/shared/agent-hook-listener.test.ts src/main/pi/agent-status-extension-source.test.ts(241 passed)oxlint --deny-warningson changed filespnpm typecheckpnpm lintpassed before the final focused expansionpnpm testreached 4,803 passing and 19 skipped tests. Four unrelated environment-sensitive tests failed: Bitbucket credential state, SSH askpass environment, one benchmark threshold, and one dynamic-import timeout.Linux, Windows, SSH, mobile, and native desktop behavior were not run locally. The generated hook remains platform-neutral and existing WSL/SSH routing is unchanged.
AI Disclosure
OpenAI Codex GPT-5.6 Sol assisted with diagnosis, implementation, and tests.
Review
Reviewed for lifecycle ordering, duplicate completion, stale interactive state, identity stability, security, cross-platform path handling, SSH/WSL routing, mobile status projection, backward compatibility, and hot-path performance. No blocking issue remains in focused review.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author