Repository navigation
Conversation
…gents Cursor titles used to skip the delayed Enter after the idle mail pointer (stablyai#3156). Current cursor-agent leaves that text in the composer, so the nudge never runs. Use the same paste-then-Enter path for Cursor. Fixes stablyai#19760
📝 WalkthroughWalkthroughThe change removes Cursor-specific orchestration-target detection and the branches that skipped synthesized Enter submission. Accepted mailbox pointer writes now use the delayed Enter flow for all supported agent terminals. New unit tests cover multiple agent titles and tab-title detection. The end-to-end test now expects the Cursor pointer to be submitted. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to Cursor pointers now use the shared delayed Enter submission path, but the new title-based unit coverage does not validate title-dependent target selection. A regression that prevents Cursor from reaching staging could therefore remain undetected. 🚥 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: Advanced
Run ID: d3da08d3-2738-411d-8c14-489da4c27b9b
📒 Files selected for processing (6)
src/main/runtime/orca-runtime-core.tssrc/main/runtime/orca-runtime-deliver-pending-messages.tssrc/main/runtime/orchestration/mailbox-pointer-stage-cursor-submit.test.tssrc/main/runtime/orchestration/mailbox-pointer-stage.tstests/e2e/helpers/orchestration-mail-pane-agent.tstests/e2e/orchestration-idle-mail-delivery.spec.ts
💤 Files with no reviewable changes (2)
- src/main/runtime/orca-runtime-core.ts
- src/main/runtime/orchestration/mailbox-pointer-stage.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| resolveSubmitTarget: () => ({ | ||
| leaf, | ||
| terminalHandle: 'term-1', | ||
| processIncarnation: 'inc-1' | ||
| }), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Test the title-dependent target resolution.
resolveSubmitTarget always returns a target. It does not inspect lastOscTitle or getTabTitle. Every title case therefore tests the same staging path.
Use the real title-resolution path, or make the test mock validate and branch on the supplied leaf and tab title. A regression that rejects Cursor before staging would still pass this test.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Cursor idle-mail pointer submit —
finishPointerWriteAndStageEnterdrops itsisCursorAgentTitleshort-circuit, so Cursor titles now reach the sharedsubmitEnterpath (submitOrchestrationMailboxPointer): pointer write, then a delayed separate\r, same as Claude/Codex/Kimi/Grok. - Dead-helper removal —
isCursorAgentOrchestrationTargetand itsisCursorAgentTitleimport are removed fromorca-runtime-core.ts, along with the matching skip in the orphaneddeliverPendingMessagesmixin. No stale references remain. - Coverage — new
mailbox-pointer-stage-cursor-submit.test.tsasserts the pointer payload is\r-free and a trailing\rwrite lands for Cursor titles (osc-title and tab-title paths); the E2E Cursor case flips toexpectSubmitted.
The change is minimal and correct. The removed Cursor branch was the last user-owned submit path, and the submit path's live-idle gate (lastAgentStatusObservedLive / queueSafe / deferFlightUntilIdle) still applies to Cursor since a Cursor title classifies as idle, so the pointer only submits at an idle prompt like every other agent. The unit test can genuinely fail (it polls for the \r write), and the two title-detection paths are both asserted.
The one unverified assumption is empirical and documented: current cursor-agent no longer auto-submits injected PTY text, which is the rationale for inverting #3156. No live cursor-agent E2E was run (the author notes this), so that claim is exercised only by the updated Playwright fixture + CI, not against a real Cursor coordinator.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Thanks! Your change landed via #33347 (your commit kept, plus Co-authored-by on the squash), rebased onto current main with the now-dead tab-title dependency removed; verified with a real cursor-agent that the pointer + delayed Enter submits. Closing as superseded. |
…ving them in the composer (#33347) Orchestration mailbox pointers now get their delayed Enter for Cursor too (the Cursor no-Enter skip from #3156 left mail delivered but never acted on). Verified with real cursor-agent. Fixes #19760. Supersedes #19761. Co-authored-by: Maple <[email protected]>

ELI5
When Cursor CLI is the coordinator, Orca types "you have N orchestration messages" into the input box and then stops. Other agents get a follow-up Enter so they actually run the check. This change sends that same Enter for Cursor, so the nudge is submitted instead of piling up in the composer.
What Changed
\rpath as Claude / Codex / Kimi / Grok.deliverPendingMessagesmixin (live run/dispatch mail already goes throughmailbox-pointer-stage.ts).\rafter the pointer, and that Codex / Claude / Kimi still do too.Why
#3156skipped Enter for Cursor because older Cursor Agent treated injected PTY text as a user-owned draft. Currentcursor-agent(2026.09.08) does not auto-submit that text, so the pointer sits in the composer. A later user Enter then sends the stacked pointer lines plus whatever they typed.Dispatch inject is a different path (
writeTerminalAgentPrompt: bracketed paste, settle delay, separate\r) and already submits. This bug is only the idle mail pointer.Linked Issue
Fixes #19760
Related: #3034 / #3156 (original skip), #14832 (submit-while-typing, separate), #16822 (disable the pointer, separate).
Visual Proof
N/A — no UI chrome change. Behavior is a PTY write of
\rafter the existing pointer text. I did not attach a live Cursor terminal recording.Testing
Automated:
vitestmailbox-pointer-stage-cursor-submit.test.ts(6),mailbox-pointer-stage.test.ts(5),mailbox-pointer-submit.test.ts(11), plus formatter and eligibility tests — all passedoxfmton the changed filesoxlintandcheck-changed-code-quality.mjs— 0 findingstsc --noEmit -p config/tsconfig.node.json— passedcheck-max-lines-ratchet— passedNot run here (CI should cover):
pnpm lint/pnpm test/pnpm build(Electron postinstall was still downloading a binary in this environment)orchestration-idle-mail-delivery.spec.ts(needs a packaged Electron app)cursor-agentend-to-end against a running Orca desktop — not done. Reason: this patch is against upstream source, not the installed 1.4.198 app, and standing uppnpm devplus a real Cursor coordinator was not cost-justified in this run.Platforms actually exercised: Linux unit tests only. The Enter byte is still
\rafter the existing 500ms delay on every OS; no platform-specific branch was added.AI Disclosure
Patch drafted with Grok 4.6 (xAI) in an Orca-dispatched coding session, then reviewed against the current
mailbox-pointer-stage/writeTerminalAgentPromptsplit.Review
writePty(ptyId, '\r')afterenterDelayMs(default 500, overridable in E2E). No new OS check. Windows ConPTY ingest delay lives on the dispatch-inject path, not this pointer path; that is unchanged.writeOrchestrationPointerPtyand the session write gate. No remote wire change.\rwrite on Cursor idle delivery; no new timers beyond the existing delay.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
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
#3156made Cursor skip Enter on purpose. This PR treats that skip as obsolete for coordinator Cursor CLI. If a human-driven Cursor pane still prefers inject-without-submit, that should be an explicit setting (see #16822) rather than a silent title match.Trust-dialog /
agent_prompt_stalledon first Claude/Kimi launch is a different inject path and is not addressed here.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Local: targeted oxlint + node typecheck + focused vitest. Full lint/test/build left to CI.