Repository navigation
Conversation
A createPlan call that Cursor finished with an error already marked its plan node and turn item failed, but the plan artifact still went active. The thread then showed "Plan Ready" and the implement-plan prompt, and the server accepted the failed plan as an implementation source. Only a plan Cursor accepted becomes active now; a failed one stays a draft, so its markdown and failed row remain visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recover the focused plan lifecycle test and superseded status from lane commits 6b478d3025 and 09fe3f2ea0 verified during the outage. Replace the mixed diagnostics test addition with the dedicated protocol regression. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped Cursor adapter fix that prevents failed plan proposals from being presented or accepted as actionable while preserving successful plan behavior. It reuses existing lifecycle statuses and adds focused regression coverage without schema or infrastructure changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Set and verify completed plan status packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/adapter.test.ts |
Failed completed plan operations now set the plan status to superseded. Successful completed plans remain active, and incomplete plans remain draft. Tests verify plan content and the related item and node statuses for success and failure. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to b91e1
-
Failed Cursor plans are not actionable, while successful plans remain available for implementation. No merge-blocking issue was identified.
Pre-merge checks: 
4
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Note Written by Verified in a real dev environmentpartial verification at
main codex control: pr successful codex plan control: command transcript. captures inspected; uploaded video playback and seeking checked in t3's player. Not verifiedthe changed cursor failure behavior remains unverified. the diff handles cursor sdk therefore i did not reproduce the original cursor error on main, produce a failed cursor plan on the pr, or exercise its native mobile, packaged electron, macos/windows, and remote/relay/tunnel modes were not exercised on this linux vm. no source changes or pushes were made. result: unverifiable for the actual fix, with the two codex controls above passing. |


Problem
A Cursor
createPlancall can finish with an error while T3 marks its proposed plan active. The plan node and turn item already say failed, but clients can still offer to implement the plan and the server accepts it as a source plan.Change
Retire a failed proposal with the existing
supersededstatus. Keep its markdown and failed turn item for inspection. A plan starts as a draft, and a successful completion still makes it active.Add a focused adapter regression for both outcomes. It checks that the start and completion update the same plan, preserve its markdown, and agree with the node and turn-item status.
Scope and approval
This is a small, focused fix for an obvious status contradiction in the Cursor SDK adapter. It uses the existing lifecycle and needs no schema or client changes. No matching issue was found.
Verification
vp test run packages/provider-cursor/src/server/adapter.test.ts -t "keeps a completed Cursor plan" --maxWorkers=1: the failed-plan case fails on base because it receivesactive; the successful control passes. Both cases pass on the candidate.vp test run packages/provider-cursor/src/server/adapter.test.ts --maxWorkers=1: 16/16 pass locally.vp lint packages/provider-cursor/src/server/adapter.ts packages/provider-cursor/src/server/adapter.test.tsandvp fmt --checkfor the same files pass. The test also passes the newer main test lint rules.pnpm run typecheckpasses locally, with suggestions only.vp buildand servervp packpass for base and candidate. Their web source is identical, so both servers use the same production web bundle.activeon base,supersededon candidate failure, andactiveon candidate success.Not checked: live Cursor service, a manual sourcePlanRef dispatch, packaged Electron, Windows, iOS and Android. The Orchestrator's active-plan guard was inspected; the fixture supplies provider responses, and screenshots come from the running production app.
Before: the rejected proposal still shows Plan ready and Implement.
After: the same rejected proposal keeps its plan text, with no Plan ready banner or Implement button.
Successful control before and after: both retain Plan ready and Implement.
The new regression fails on base for the rejected proposal; its successful control passes.
Both regression cases pass on the candidate.
Prior PRs: #4942 by Ihor Levchenko (@redwon) addressed refined plan files in the old ACP adapter. Julius Marminge closed it because orchestration V2 replaced those files. This fixes a different SDK status bug and reuses no code. #21448 fixes unfinished generic tool rows in a separate handler.
Generated with Claude Opus 5.5 and GPT-6.1 Sol in T3 Code Nightly