cursor / cursor/cookbook

Export a public reconnect/retry signal on the TypeScript SDK

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.1k
Forks
492
Avg merge
37m
Merged PRs (30d)
3

Description

Headless embedders of @cursor/sdk set local.enableAgentRetries: true (the default for this posture) so stalled transport recovers automatically. The SDK does not export reconnect or retry state: there is no public onConnectionStateChange, no stream message, and no status value for RETRYING.

Internal machinery already exists (stall detector, onConnectionStateChange with reconnecting / connected, transport-retry counters). It is not on the public TypeScript surface.

Without that signal, an embedder's idle timeout cannot distinguish model silence from an in-progress SDK reconnect. Idle kills then look like a dead model in post-mortems even when the SDK was retrying.

Please export the existing internal stall detector / connection-state hook (for example onConnectionStateChange and/or a stream status for retrying) so embedders can keep transport retries enabled and still observe them.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the internal stall detector, the existing onConnectionStateChange hook, and the transport-retry counters in the TypeScript SDK. Define and expose a public reconnect/retry signal, then verify that an embedder can distinguish model silence from an in-progress retry while local.enableAgentRetries remains enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.