Skip to content

Fix Cursor terminal and interaction-query semantics - #2

Open
hffmnnj wants to merge 4 commits into
feat/grok-4-6-catalogfrom
fix/cursor-terminal-semantics
Open

Fix Cursor terminal and interaction-query semantics#2
hffmnnj wants to merge 4 commits into
feat/grok-4-6-catalogfrom
fix/cursor-terminal-semantics

Conversation

@hffmnnj

@hffmnnj hffmnnj commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • capture the three Cursor terminal signal and transport-close shapes
  • finish cleanly and idempotently on Cursor turn completion
  • preserve explicit errors for closure without a terminal signal
  • reject supported interaction queries so valid turns can continue
  • keep VM setup and server-control messages fail-fast

Verification

  • npx tsc -p tsconfig.json --noEmit
  • bun test/smoke.ts
  • bun run build
  • git diff 7affbe4..HEAD --check

This change is stacked on fork PR #1.

Split the ambiguous turnEnded fixture into deterministic kept-open and transport-close sequences before changing proxy behavior. The smoke coverage shows that turnEnded is currently a no-op, leaving semantic watchdog or transport-close handling to finish the response.\n\nChanges:\n- Add text-plus-turnEnded scenarios with kept-open and closed HTTP/2 transports\n- Name terminal-less transport closure and assert the explicit finishTerminal cascade\n- Bound the kept-open reproduction with test-controlled semantic watchdog settings
Cursor can signal normal completion with InteractionUpdate.turnEnded while leaving the HTTP/2 response open. Route that signal through the existing idempotent terminal owner so SSE clients receive stop, usage, and exactly one completion marker without waiting for the semantic watchdog.\n\nPreserve strict errors for terminal-less transport closure and protect the clean result from a later close. Adapted from tanushshukla/opencode-cursor@a067e099.
Reply with typed protocol rejections for Cursor queries whose generated responses support a negative result, allowing the server to continue the same turn. Keep VM setup and server controls fail-fast rather than falsely acknowledging unperformed privileged operations.\n\nChanges:\n- encode typed rejections for web, question, mode, Exa, and plan queries\n- cover continued turnEnded completion and explicit control failure\n- document the protocol disposition and tanushshukla/opencode-cursor@a067e099 attribution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant