Merged
Conversation
Two bugs caused the agent to lose context from previous messages: 1. Every request generated a fresh conversationId (crypto.randomUUID()), so Cursor's server treated each turn as a new conversation. 2. The server's conversationCheckpointUpdate messages were silently dropped. This is the canonical conversation state the server sends back after each turn, which the client must capture and return with subsequent requests. Fix: store conversationId, checkpoint bytes, and accumulated blobs per conversation (keyed by model + first user message hash). On subsequent turns, reuse the stored conversationId and send the server's checkpoint as conversationState instead of reconstructing from OpenAI messages. Fall back to client-side reconstruction on the first turn when no checkpoint exists. Includes 30-minute TTL eviction and cleanup on stopProxy().
Reuse server checkpoint and blob store between requests so multi-turn conversations maintain full history without client-side reconstruction.
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.
No description provided.