cherry-pick cursor acp thread rendering fix#60
Open
tarik02 wants to merge 2 commits into
Open
Conversation
- Send session/cancel as a spec-compliant JSON-RPC notification (no id); the Cursor CLI dropped the malformed message so turns kept running after pausing a thread. - Tag ACP assistant segment item ids with a per-runtime tag so resumed sessions stop appending new output to messages from earlier runs, which pushed assistant text above the latest user message. - Parse agent_thought_chunk into channel-aware segments and surface the accumulated reasoning as expandable thinking rows in the work log. - Drain queued ACP session updates before emitting turn.completed in CursorAdapter (raced against the notification fiber to avoid hanging on mid-turn teardown). Co-authored-by: Cursor <cursoragent@cursor.com>
…ng deltas - sendTurn's drain race also settles when stopSessionInternal interrupts the notification fiber. Check ctx.stopped after the race and bail out before mutating turn state or emitting turn.completed, so a torn-down session can no longer produce events after session.exited. Covered by extending the stop-during-pending-approval test. - Document why reasoning_text content deltas are intentionally not appended to the assistant message by ingestion: the full thought text is accumulated in the runtime segment and persisted via item.completed, and segments close on prompt settlement so cancelled turns keep their reasoning. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
What Changed
Cherry-picks the two change commits from pingdotgg#3669 on top of
revert/fork-cursor-fixes.Why
Applies the upstream Cursor ACP thread rendering, thought output, and cancel delivery fixes after removing the fork-specific Cursor fixes.
UI Changes
N/A.
Checklist