# Using the cursor typescript sdk and repeatedly hit cases where a run fails

**URL:** <https://forum.cursor.com/t/using-the-cursor-typescript-sdk-and-repeatedly-hit-cases-where-a-run-fails/163481>\
**Category:** Bug Reports\
**Tags:** cursor-sdk\
**Created:** [June 17, 2026, 11:05am UTC](https://forum.cursor.com/t/using-the-cursor-typescript-sdk-and-repeatedly-hit-cases-where-a-run-fails/163481 "2026-06-17T11:05:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhenduo\_Hou](https://avatars.discourse-cdn.com/v4/letter/z/919ad9/32.png) [@Zhenduo\_Hou](https://forum.cursor.com/u/Zhenduo_Hou)\
**Post date:** [June 17, 2026, 11:05am UTC](https://forum.cursor.com/t/using-the-cursor-typescript-sdk-and-repeatedly-hit-cases-where-a-run-fails/163481/1 "2026-06-17T11:05:13Z")

</div>

### Where does the bug appear (feature/product)?

Cursor SDK

### Describe the Bug

Hi Cursor team, we are seeing repeated Cursor SDK runs ending with `status: "error"` but without any actionable error details.

In these cases, `agent.send()` succeeds, `run.stream()` only emits `RUNNING -> ERROR`, and `run.wait()` resolves instead of throwing a `CursorSdkError`. The returned result only contains fields like `status`, `id`, `requestId`, `model`, and `durationMs`, but no `code`, `error type`, `message`, HTTP `status`, `operation`, `isRetryable`, or `helpUrl`.

Could you help check what these failures are? Also, is there a recommended SDK-side way to get the actual error type/details when `run.wait()` returns `{ status: "error" }` instead of throwing a `CursorSdkError`?

### Steps to Reproduce

Repro path in our integration:

1. Create or resume a local Cursor SDK agent with @cursor/sdk.
2. Call `agent.send(message, { model })`.
3. Consume `run.stream()`.
4. The stream only emits status transitions like `RUNNING -> ERROR`.
5. Call `run.wait()`.
6. `run.wait()` resolves with `{ status: "error", id, requestId, model, durationMs }` instead of throwing a `CursorSdkError`.
7. The result contains no `code`, `error type`, `message`, HTTP `status`, `operation`, `isRetryable`, or `helpUrl`.

### Operating System

Linux

### Version Information

@cursor/sdk v1.0.18

### For AI issues: which model did you use?

composer-2.5, default(auto), gpt-5.5 etc

### For AI issues: add Request ID with privacy disabled

Example requestIds:

- 59d4d45f-20bf-4703-a6cb-f5bda5d52115
- 5d855789-612f-4739-b9bc-ef890d57e126
- 140d0d11-fcbb-4370-95e5-94eac09f03f5
- 665930bd-531d-4644-9276-9cbf9b1756e5
- 5f012fab-e800-49ff-a16f-314219a042ae
- 06b1fb38-959f-4a91-a92e-3d9a09c656de

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [June 17, 2026, 11:44am UTC](https://forum.cursor.com/t/using-the-cursor-typescript-sdk-and-repeatedly-hit-cases-where-a-run-fails/163481/5 "2026-06-17T11:44:08Z")

</div>

Hey @Zhenduo_Hou!

Have a look at this thread, it seems to match what you’re reporting:

> [@Agent.send().wait() returns bare status: "error" while ConnectRPC \[unauthenticated\] leaks as unhandledRejection](https://forum.cursor.com/t/agent-send-wait-returns-bare-status-error-while-connectrpc-unauthenticated-leaks-as-unhandledrejection/161203):
>
> Summary When the cloud-side ConnectRPC stream backing agent.send() is terminated by the server with an end-stream error (observed: [unauthenticated] Error), the SDK: Does not throw from sdkRun.stream() async iterator; Returns wait() with a bare { id, status: "error", model, durationMs } object (no error field, no code, no message); Lets the underlying ConnectError escape as a Node-level process.on('unhandledRejection'), with a stack pointing at @connectrpc/connect’s endStreamFromJson / asy…

---

<div class="post-metadata">

**Author:** ![Zhenduo\_Hou](https://avatars.discourse-cdn.com/v4/letter/z/919ad9/32.png) [@Zhenduo\_Hou](https://forum.cursor.com/u/Zhenduo_Hou)\
**Post date:** [June 17, 2026, 12:01pm UTC](https://forum.cursor.com/t/using-the-cursor-typescript-sdk-and-repeatedly-hit-cases-where-a-run-fails/163481/7 "2026-06-17T12:01:22Z")

</div>

Thanks @Colin . Really appreciate your quick response. I took a quick look at the post you shared with me, and it is indeed the same issue. I’d like to ask if there have been any follow-ups or updates on this issue?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [June 30, 2026, 2:55pm UTC](https://forum.cursor.com/t/using-the-cursor-typescript-sdk-and-repeatedly-hit-cases-where-a-run-fails/163481/10 "2026-06-30T14:55:53Z")

</div>

Hi @Zhenduo_Hou!

We should see this fixed in the next SDK release, meaning run errors will be properly surfaced.
