Repository navigation
fix(cursor): return valid JSON from managed hooks - #15576
Closed
sanshengai wants to merge 1 commit into
Closed
sanshengai wants to merge 1 commit into
sanshengai wants to merge 1 commit into
Conversation
12 of 13 tasks
Author
|
Closing as superseded by merged #15651, which fixes the same Cursor managed-hook stdout JSON contract on current |
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.
ELI5
Orca's managed Cursor hooks reported activity but returned no response. Cursor expects hook stdout to be valid JSON, so permission hooks could fail closed and block every tool call. The hooks now return protocol-valid JSON while preserving Orca telemetry.
What Changed
{"permission":"allow"}for Cursor permission events:preToolUse,beforeShellExecution, andbeforeMCPExecution.{}for the other subscribed Cursor events.Why
Blank stdout is not a valid Cursor hook response and triggered the failure reported in #15462. Passing a constant response through an event-scoped environment variable keeps the original telemetry payload on stdin unchanged.
Linked Issue
Fixes #15462
Visual Proof
N/A — this changes the hook subprocess protocol, not rendered UI.
Testing
vitestforhook-serviceandinstaller-utils: 62 passed, 7 skipped.pnpm run typecheck:node.oxlint,oxfmt --check, max-lines ratchet, andgit diff --check.A broader stdin-lifecycle run still reproduces the existing Windows
antigravity-hook.cmdEOF race; that file and code path are unchanged by this PR.AI Disclosure
OpenAI Codex (GPT-5 family) assisted with investigation, implementation, and testing.
Review Notes
{}as the default response.Author