Repository navigation
Conversation
…ablyai#14278) OMP has no agent_settled event, and ctx.isIdle() can stay false through its completion callback path, so the idle-recheck fallback never posts the final agent_end and the pane stays stuck at working. Key the OMP-runtime path on the documented willContinue signal: true = scheduled continuation (stay active), otherwise terminal (post once). Pi agent_settled/idle logic is unchanged.
…rage Hoist clearPendingAgentEndCheck so both OMP paths drop any stale idle recheck, cover an explicit willContinue:false terminal agent_end, and assert no status posts while a continuation is pending. Co-Authored-By: Claude Fable 5 <[email protected]>
|
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)
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a42660ce-5105-46d0-9674-3d2cba6c3413
📒 Files selected for processing (2)
src/main/pi/agent-status-extension-source.test.tssrc/main/pi/agent-status-handler-source.ts
|
Cross-linking #13891 / #13890. This PR fixes the authoritative OMP completion path (
The production code does not overlap: #14330 changes the generated OMP status extension; #13891 changes shared terminal-title classification and main-process spinner cleanup. If #14330 (or the broader #14279) lands, #13891 remains useful for status resilience when hook delivery is missing, delayed, or cleared. For maintainers: #14279 appears to be the broader competing implementation of this PR's |
CodeRabbit review: undefined exercised the !event fallback, not a willContinue-less event; the runtime-detected case still covers undefined. Co-Authored-By: Claude Fable 5 <[email protected]>
|
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 #14279 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. |
|
Superseded by #20603 (OMP terminal lifecycle settlement), which contains the current implementation and verification on . Closing this stale duplicate so review stays on the maintained PR. |
|
Superseded by #20603. |
ELI5
When an OMP agent finished its turn, the Orca pane could stay stuck showing "working" forever. Orca was waiting for OMP to report itself idle, but OMP never does that — instead it says on each
agent_endwhether it will continue. Now Orca listens to that signal: if OMP says it's continuing, the pane stays working; otherwise it settles to done immediately.What Changed
agent_endhandler now branches for OMP runtimes:willContinue === truekeeps the pane active (and drops any stale idle-recheck timer), anything else posts the terminalagent_endright away.agent_settled/ idle-recheck behavior unchanged.agent_endposts forompkind (with and without an explicitwillContinue: false) and for runtime-detected OMP whileisIdlestays false; a continuation (willContinue: true) keeps the pane active with no post and no pending timers until the next loop settles.Why
OMP has no
agent_settledhook and itsctx.isIdlecan stayfalsethrough completion, so the existing idle-recheck fallback never fired and the pane stuck at "working".willContinueis OMP's terminal-signal contract, so keying off it settles status deterministically. OMP builds that predatewillContinuefail open to "done" rather than stuck-at-working.Linked Issue
Addresses the stuck-at-"working" completion path of #14278 (the first two expected behaviors: terminal
agent_endposts once whenwillContinue !== true, andwillContinue === truekeeps the pane active). The issue's remaining items — OMP identity stability, structuredaskprompts, and approval-event forwarding — are intentionally out of scope here and are implemented in #14279.Visual Proof
N/A — main-process generated-extension logic; the only user-visible effect is the pane status settling to done instead of sticking at "working", which is covered by unit tests.
Testing
npx vitest run src/main/pi/agent-status-extension-source.test.ts— 36/36 pass (includes 4 new/updated OMP cases)oxlinton changed files — clean (including the max-lines gate)tsc --noEmit -p config/tsconfig.node.json— cleanFull
pnpm lint/pnpm test/pnpm buildleft to CII manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Code review, tightening, and test additions done with Claude Code (Claude Fable 5).
AI review summary: cross-platform — the change is inside the generated string extension (plain JS, no platform APIs), macOS/Linux/Windows and WSL curl fallback untouched; SSH/remote — no wire change, payload shape identical (
hook_event_name: 'agent_end'), loopback posting unchanged; agent compatibility — Pi and prime-agent paths are untouched, OMP withoutwillContinuefails open to done; performance — removes the exponential idle-recheck timer loop for OMP entirely; security — strict=== truecheck on an event field from the in-process hook, no new trust boundary.Review
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author
🤖 Generated with Claude Code