Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This targeted fix recycles only Cursor sessions that report a transport failure, terminating the compromised ACP process while preserving the resume context for the next session. The accompanying test verifies cleanup and successful resumption, with no changes to defaults, schemas, deployment, or static-analysis configuration. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Cursor adapter now stops a session after a transport failure. The test verifies session removal, process termination, request counts, and resumption with the original cursor. ChangesCursor session recycling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The session-recycling change has no remaining concrete merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Dismissing prior approval to re-evaluate e832010
|
Thanks for working on this. We merged the orchestrator V2 rewrite in #2829, and we are closing this PR as part of that transition. This change touches CursorAdapter.ts, which the V2 merge removed. Cursor now runs through the SDK-based CursorAdapterV2 instead of the V1 ACP adapter. Sorry for the extra work this creates. If the change is still needed on V2, please rebuild it on current main, verify it there, and open a new PR linking back here. We're closing the current implementation without assuming the underlying request is resolved. |
Cursor can return a standalone transport diagnostic such as
RetriableError: [canceled] http/2 stream closed with error code CANCEL (0x8)after ACP reports a nominally successful prompt. T3 already surfaces that turn as failed, but it kept the compromised ACP child and session registered, so later turns could reuse the broken transport.This change retires that Cursor session through the existing per-thread lifecycle lock before returning the transport error. It deliberately does not replay the prompt because tools may already have run; the saved resume cursor remains available so the next session can reconnect with
session/loadwithout losing conversation context.The regression test verifies the typed failure, child-process termination, session removal, a single prompt dispatch, and successful resume through a fresh ACP process.
Verification:
vp test run apps/server/src/provider/acp/CursorTransportFailure.test.ts apps/server/src/provider/Layers/CursorAdapter.test.ts(43 passed)vp run --filter t3 typecheckvp fmt --checkandvp lintBuilt with GPT-5 using the Codex harness.
Summary by CodeRabbit