Repository navigation
fix(relay-node): wake idle Cursor CLI sessions with Relay messages #2121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: AgentWorkforce/relay
Length of output: 8303
Script executed:
Repository: AgentWorkforce/relay
Length of output: 42171
Web query:
Cursor CLI hooks stop multiple hooks followup_message waits all hooks complete parallel followup_message documentationResult:
Script executed:
Repository: AgentWorkforce/relay
Length of output: 25034
Web query:
Cursor agent CLI 2026 hooks "stop" "followup_message" "all" hooks wait responses parallelResult:
Web query:
Cursor hooks multiple stop hooks wait all hooks completed followup_message response parallel execution Cursor CLIResult:
Script executed:
Repository: AgentWorkforce/relay
Length of output: 13046
Web query:
site:cursor.com/changelog "Hooks now execute in parallel with merged responses" CLI date versionResult:
Script executed:
Repository: AgentWorkforce/relay
Length of output: 14284
Preserve other stop-hook follow-ups.
When another stop hook returns a follow-up and Relay has no pending message, the CLI waiter can delay that follow-up for 59 minutes. This also affects installations with both Relay builds. Make the wait compatible with other stop hooks while retaining Relay wake-ups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not changed: this is the known trade-off described in the PR description, and the editor wait has behaved the same way since it shipped. Cursor acts on a
followup_messageonly after everystophook returns, and a hook sees neither the other hooks' output nor any follow-up Cursor holds. So nothing in the payload or the waiter state shows that another hook produced one. Two Relay builds (--dev) keep separate entries and inboxes, so with direct delivery on in both, a wake from one waits until the other build's hook ends. Turningcursor_direct_deliveryoff in one build avoids that; coordinating waits across builds would be a separate change.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khaliqgant Thanks for the clarification. I was wrong to suggest that the payload or waiter state could identify another hook’s follow-up.
I understand that the delay is an accepted trade-off for this PR. Disabling
cursor_direct_deliveryin one build avoids the cross-build delay, though other stop hooks can still be delayed.Would you like a follow-up issue for cross-build wait coordination?
You are interacting with an AI system.