Skip to content

fix(serve): wait to resume a transcript an in-flight submit is writing - #186

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-2d48
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-2d48

Conversation

@cursor

@cursor cursor Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

A session.resume on a connection that is already running prompt.submit for that same transcript used the session-less frame lane, so it read the file mid-run. read_session_messages then dropped the trailing user line, and the client switched to a fork that did not contain the in-flight turn (the reply stayed on the old bag).

session.resume is now queued by params.id, so resuming the transcript a submit is still writing waits until that run finishes. A resume of a different id still does not wait.

Validated with node node_modules/vitest/vitest.mjs run test/serve_prompts.test.ts and tsc --noEmit.

Open in Web View Automation 

session.resume was queued with frames that name no session, so it could
read a transcript while prompt.submit was still appending. The fork then
dropped that trailing user turn and the client left the run that held the reply.

Co-authored-by: moikapy <[email protected]>

This branch has not been deployed

No deployments
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