Skip to content

fix(cursor): harden ACP session resume and provider recovery#9

Merged
justingray0 merged 1 commit into
mainfrom
fix/cursor-acp-resume
Jun 29, 2026
Merged

fix(cursor): harden ACP session resume and provider recovery#9
justingray0 merged 1 commit into
mainfrom
fix/cursor-acp-resume

Conversation

@justingray0

Copy link
Copy Markdown
Owner

Summary

  • Gate ACP session/load replay before allowing new prompts so resumed sessions do not race ahead of replayed history.
  • Recover orphaned provider sessions on server startup and keep provider activeTurnId in sync with turn lifecycle events.
  • Reset completed assistant segments in place when item.started replays within the same turn, and unstick sessions when stop races a dead provider.

Test plan

  • vp test apps/server/src/provider/Layers/ProviderSessionRecovery.test.ts
  • vp test apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
  • vp test apps/server/src/provider/acp/AcpRuntimeModel.test.ts
  • vp test apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts (resume reset case)

Made with Cursor

Gate session/load replay before prompting, recover orphaned provider sessions
on startup, sync active turn state from lifecycle events, and reset assistant
segments in-place when item.started replays within the same turn.

Co-authored-by: Cursor <cursoragent@cursor.com>
@justingray0
justingray0 force-pushed the fix/cursor-acp-resume branch from 8b674d5 to a9a6d39 Compare June 29, 2026 22:37
@justingray0
justingray0 merged commit 3e5a1ce into main Jun 29, 2026
justingray0 added a commit that referenced this pull request Jul 4, 2026
…utput, cancel delivery

Applies pingdotgg#3669 on top of the fork's #9 resume/recovery hardening.
Fixes: session/cancel sent as JSON-RPC notification (not request), runtime-unique
ACP segment item ids so resumed sessions render below the latest user message,
agent_thought_chunk parsed as expandable reasoning rows, and a turn-completion
drain race. Supersedes the reverted #10 turn-scoping.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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