fix(provider): recycle sidecar after idle/terminal errors#75
Closed
justin-carper wants to merge 1 commit into
Closed
fix(provider): recycle sidecar after idle/terminal errors#75justin-carper wants to merge 1 commit into
justin-carper wants to merge 1 commit into
Conversation
Cursor's SDK memoizes its streaming transport with no reconnect. After an idle gap (15-60min+), the backend drops the session and every later run ends `status:"error"` until the process restarts — /new doesn't help because the state lives in the long-lived Node sidecar child. Recycle the child after 10 minutes idle (below the shortest reported onset) and after any terminal run error. Pooled agents resume from Cursor's checkpoint store on the next turn, same path as an opencode restart. Complements #52's per-agent resume retry, which cannot heal a dead transport shared by every subsequent agent in the same child.
justin-carper
force-pushed
the
fix-cursor-inactivity-err
branch
from
July 24, 2026 15:45
f034bb3 to
5255909
Compare
Collaborator
Author
|
Closing as superseded by #76 (v0.5.0 native experience overhaul). Rationale:
Remaining gaps worth tracking separately (not addressed here):
If either proves to be a real problem, the right fix is a transport-agnostic reset/retry for fresh turns, not sidecar-child recycling. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cursor run ended with status "error"./newdoes not help; only restarting opencode does.@cursor/sdk, which memoizes its streaming transport with no reconnect. Cursor's backend drops idle sessions; unary RPCs still succeed (so runs get created), but the dead stream ends every runstatus:"error". The dead state is process-wide → fails fresh sessions too.Test plan
npm run typechecknpm test(310 tests)npm run build