Skip to content

fix: ignore Cursor replayed turn output#28

Merged
tarik02 merged 1 commit into
mainfrom
fix/cursor-restart-replay-guard
Jun 14, 2026
Merged

fix: ignore Cursor replayed turn output#28
tarik02 merged 1 commit into
mainfrom
fix/cursor-restart-replay-guard

Conversation

@tarik02

@tarik02 tarik02 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Ignore turn-output runtime events that arrive without the active turn id while a turn is running.
  • Remember item ids from skipped no-turn replay events so their follow-up completion under the active turn is skipped too.
  • Add a regression test for Cursor ACP replay after backend restart: old assistant segment is replayed without turnId, then the new turn continues with later segments.

Upstream check

  • Checked latest upstream/main; it does not add a replay guard for this case.
  • Upstream currently uses provider item ids for assistant messages in ProviderRuntimeIngestion, which does not mitigate Cursor segment replay/reuse. This fork keeps turn-scoped assistant ids and adds the replay guard.

Validation

  • ./node_modules/.bin/vp test run apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts -t "ignores cursor assistant item replay"
  • ./node_modules/.bin/vp test run apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts
  • ./node_modules/.bin/vp check --fix && ./node_modules/.bin/vp check
  • ./node_modules/.bin/vp run typecheck

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Jun 14, 2026
@tarik02 tarik02 merged commit ced365a into main Jun 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant