Repository navigation
Conversation
Grok 1.0+ reports idle via Notification type idle_prompt/task_complete and uses StopCancelled instead of Stop on interrupt. Orca only treated Stop/SessionEnd/StopFailure and leftover TUI copy as done, so a finished turn could stay working after the TUI already printed stop [hooks: 1]. Also raise the Grok hook curl deadline so Stop bodies that include lastAssistantMessage can land.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds Grok Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Grok completion and cancellation events now transition status to done and allow larger final payloads additional delivery time. No concrete current-head merge-blocking risk remains. 🚥 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: cd2aeca3-7f6d-416d-8fd6-0bc922319a48
📒 Files selected for processing (8)
src/main/agent-hooks/installer-utils.tssrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/grok/hook-service.test.tssrc/main/grok/hook-service.tssrc/main/grok/windows-grok-hook-script.test.tssrc/main/grok/windows-grok-hook-script.tssrc/shared/agent-hook-listener-grok.test.tssrc/shared/agent-hook-listener.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.
…uck-working Resolve agent-hook-listener.ts by keeping the upstream split facade. Re-apply StopCancelled, idle_prompt, and task_complete handling in the new grok provider modules.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
1 similar comment
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…uck-working Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # src/main/grok/hook-service.ts
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…uck-working # Conflicts: # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json
|
Closing as superseded by #20523, which now registers StopCancelled and marks idle_prompt / stop_cancelled as done on main. That covers the sidebar-stuck-working case. I'm not carrying forward the leftover 8s hook curl timeout (main still uses 1.5s). |
ELI5
Grok already finished and printed
stop, but Orca kept the yellow working dot because it did not treat Grok''s current idle/cancel hook events as done, and a large Stop post could time out silently.What Changed
Notificationtypesidle_promptandtask_completetodone(keep the old message-text fallback).StopCancelledand map it todone(Grok 1.0+ fires this instead ofStopon Ctrl+C / Esc / max-turns).lastAssistantMessagecan land. Other agents stay at 1.5s.Why
A finished Grok turn can leave
orca worktree psatstate: workingafter the TUI already showsstop [hooks: 1]. Title idle is suppressed while a fresh hook row says working. Grok 1.0.5 documentsidle_promptas the host idle signal andStopCancelledas the interrupt report; Orca previously ignored both. The 1.5s curl bound plusexit 0also matches TUI-success / last-status-still-working.Same machine contrast:
software-copyrightrecordedhookEventName: stop→done; two idlegrokdefaultpanes stayed on the previous tool event.This is not #14828 (console flash). That is spawn visibility. This is the done-transition.
Linked Issue
Fixes #15225
Visual Proof
N/A — hook-event mapping and curl timeout only. Sidebar dot color follows the existing status renderer; no UI chrome, layout, or new controls.
Testing
Windows:
pnpm exec vitest run --config config/vitest.config.ts src/shared/agent-hook-listener-grok.test.ts src/main/grok/hook-service.test.ts src/main/grok/windows-grok-hook-script.test.ts src/main/agent-hooks/remote-hook-service-installers.test.ts src/main/agent-hooks/installer-utils.test.ts— 127 passed, 5 skipped.Added unit coverage for
StopCancelled,idle_prompt/task_complete, legacy idle copy, install/matcher, and the Grok-only--max-time 8.Did not re-run a live Grok turn against this build (running app is still 1.4.184). Repro evidence is in [Bug]: Grok sidebar stays working after the TUI Stop hook already ran #15225.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Drafted with Grok 4.6 in the Orca checkout. Live repro and last-status evidence collected on Windows 1.4.184 + Grok 1.0.5.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Windows, Linux, and SSH/remote Grok installs all get
StopCancelledand the longer Grok curl bound.idle_promptmapping applies as soon as Notification is already installed;StopCancelledneeds the next hook install/refresh.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author