Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
SDK callback lifecycle packages/provider-cursor/src/server/CursorAgentSdk.ts, packages/provider-cursor/src/server/CursorAgentSdk.test.ts |
The session processes queued callbacks after a callback failure and drains the callback chain while waiting for the run. Callback failures are reported as run.onDelta and take precedence over run-wait failures. Tests cover continued dispatch and a race between callback and run-wait failures. |
Tool-result projection defaults packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/adapter.test.ts |
The adapter uses fallback values or empty collections when Cursor tool-result fields are omitted. Tests cover nested tool envelopes and empty file-search results. |
Buffered callback failure handling packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/adapter.test.ts |
The adapter retains buffered interaction failures and finalizes a non-interrupted turn with a provider_error. Other SDK run failures remain transport_error failures. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
#26486— Covers omittedlsresult arrays, later delta dispatch after callback failures, and callback error classification addressed by this change.
Possibly related PRs
- pingdotgg/t3code#26262 — Changes the same Cursor SDK session wrapper and introduces the
onDeltacallback chain that this change extends.
Suggested reviewers: nkoynov
Merge Risk: 
Minimal · up to b261f
-
No merge-blocking issue is established; the change is ready for normal checks.
Pre-merge checks: 
4
-
Full details: Linked Issues check
-
Explanation
The changes satisfy the coding requirements in
#26486.adapter.tsguards omittedlsroots, child arrays, and other omitted protobuf fields.CursorAgentSdk.tscontinues the callback chain after a callback failure and waits for the run and all callbacks before classifying the result. Callback failures userun.onDeltaand becomeprovider_errorfailures in the adapter. Tests cover omitted fields, continued dispatch, callback-versus-run.waitraces, and provider-error classification.
Full details: Out of Scope Changes check
-
Explanation
The changed source and test files stay within
#26486. The adapter changes support omitted Cursor tool fields and callback-failure handling. The SDK tests verify callback ordering and error precedence. No process-wide policy change or unrelatedWorkspace changedhandling was added. The separate@cursor/sdkAbortErrorremains outside this pull request.
Full details: Description check
-
Explanation
The description is thorough and substantive. It states the problem, gives incident evidence with timestamps and the error text, explains the change in three bullets, and reports validation at a specific commit with the commands run and test counts. It links the fix to issue
#26486and separates the unrelated AbortError and Workspace changed issues. It does not follow the template's Scope and approval section: it links the issue but does not show a maintainer-approval comment or explain why the fix needs no prior approval. It also omits the model and harness line that the template asks for when an agent did the work. Those gaps are minor against the rest of the content, so the check passes.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Thanks for this, and for the incident write-up in #26486. We merged the projection half separately in #26592: nested The callback half is still open and nobody else is covering it: keep delivering updates after a callback failure, drain callbacks after One thing to check while you do: dropping the "skip after the first failure" guard means later updates run after one already threw partway through. A test showing a later update still projects correctly after an earlier one failed would cover that. |
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo Closing: this is covered by #26592, which landed. Reopen if a needed part is still missing. |
Problem
A completed Cursor subagent can include tool results serialized as protobuf JSON. Empty repeated fields may be omitted, but T3's Cursor adapter assumed they were present when projecting directory listings and other nested results. A projection exception was retained by the SDK runner while subsequent updates were discarded; when the run ended, the local callback error was reported as a
run.waittransport failure.Incident evidence
Persisted turn items from an affected run show the following sequence (UTC; worker names shortened):
The last recorded provider protocol update coincided with the Worker A completion, with no subsequent protocol output until the run ended. Two earlier occurrences had a completed subagent immediately before the same error. These timestamps support the observed sequence; the stored error has no stack trace identifying the exact throwing expression. The suspected
lspath follows from inspecting the adapter's nestedconversationStepsprojection and reproducing omitted fields in tests. The logs alone do not establish that every long silent run has this cause.Change
run.onDelta/provider_errorrather than a transport failure.run.wait()settles, including on rejection, and finalize early buffered callback failures without leaving the turn active.This surfaces the failure when the provider run settles; it does not cancel the run immediately.
Validation
At head
b261f1c530622a2c30d684cd2ee7b7dc159f7af7,pnpm exec vp run check:changedpassed format, lint, both knip checks, typechecking for 10 affected packages, and both changed test files (21 tests). The tests cover omitted directory/result fields, continued delivery after a callback failure, buffered failure finalization, and an in-flight callback arriving afterrun.wait()starts. A separate Gemini 4 Argon review of this head reported no findings after its earlier callback-drain race finding was fixed.The incident was inspected retrospectively; this change has not been exercised against the affected live Cursor session. Full CI suites and build remain for CI.
Separate incident
Separate backend logs record process exits with
AbortErrorstacks in@cursor/sdkaround cancellation. That process crash and the separately reportedWorkspace changed.errors are outside this PR; neither is established as the cause of the.mapexception.Fixes #26486
Naki’s 6.1 Terra