Repository navigation
fix(agent-hooks): restore Cursor status updates in reused panes - #12714
Closed
ckdwns9121 wants to merge 1 commit into
Closed
ckdwns9121 wants to merge 1 commit into
ckdwns9121 wants to merge 1 commit into
Conversation
Cursor uses beforeSubmitPrompt rather than Claude UserPromptSubmit as its live turn boundary. Treat that event as the narrow restart signal for reusable retired panes while preserving replay, closed-tab, and retired-token fences. Constraint: Replay events, closed tabs, and retired launch tokens must remain unable to restore authority. Rejected: Reopen on Cursor sessionStart | It is not an exact user prompt boundary and could admit stale restored traffic. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep reusable-pane restart events limited to live provider prompt boundaries. Tested: Agent hook server tests (269 passed); pnpm lint; pnpm typecheck; pnpm build. Not-tested: Full suite clean; 25 unrelated environment or pre-existing failures remained among 46,425 tests. Related: #12686 Co-authored-by: OmX <[email protected]>
8 tasks done
Contributor
|
Thanks for the PR! Main covers this through #15344 (d1127b9). The retired-pane path in server-status-disposition.ts now calls a per-provider isNewTurnEvent instead of a hardcoded UserPromptSubmit check, and for cursor that returns true on beforeSubmitPrompt and sessionStart. Closing — please reopen if there's a remaining case main doesn't cover. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
beforeSubmitPrompthook as the new-turn boundary, matching the existing ClaudeUserPromptSubmitbehavior.Fixes #12686
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm test— 46,319 passed; 25 unrelated existing/environment-sensitive tests failed across terminal snapshot/IME, zsh path, Git environment, process timing, and a renderer timeoutpnpm buildpnpm exec vitest run --config config/vitest.config.ts src/main/agent-hooks/server.test.ts— 269 passedAI Review Report
Reviewed the status-authority transition for local and SSH/remote hook ingestion. The main risk was reopening a retired pane from stale traffic, so the change remains limited to non-replayed provider prompt boundaries and preserves the existing closed-tab fence. Regression tests verify both local Cursor hooks without launch authority and remote hooks with replay and retired-token checks.
Cross-platform compatibility was checked for macOS, Linux, and Windows. This change does not touch shortcuts, labels, paths, shell behavior, UI, or Electron platform branches; it only recognizes an already-normalized Cursor hook event in shared main-process status handling.
Security Audit
Reviewed hook authentication and authority handling. The restart path continues to strip the retired launch token before recording authority, does not weaken the HTTP hook token requirement, rejects replayed events, and does not add command execution, path handling, IPC, secrets, or dependency changes.
Notes
/usr/local/bin/orca-devsymlink step reported a permission warning but did not fail the build.