fix(cursor): preserve internal agent errors without transport labels (#11365)

This commit is contained in:
shivam authored and GitHub committed 2026-09-13 14:05:24 -03:00
1 parent 0118b52295
commit 9bf349cf6b
2 files changed
+4 -1

No files matched your search

@@ -38,6 +38,8 @@ describe("CursorTransportFailure", () => {
"Error: ConnectError: [unauthenticated] sign in",
"Error: ConnectError: [permission_denied] subscription required",
"Error: HTTP 500 from the application being debugged",
"Error: RetriableError: [internal] Failed to run step, exceeded max retries",
"Error: RetriableError: [internal] Failed to run step, exceeded max retries\n at step (cli.js:1:2)",
])("preserves prose, code and non-transport errors: %s", (message) => {
expect(failureFor([...message])).toBeUndefined();
});
@@ -1,6 +1,7 @@
const maxLineLength = 4096;
// Cursor also uses RetriableError for agent-loop failures; preserve those diagnostics.
const transportError =
/^Error: (?:RetriableError: .+|ConnectError: \[(?:unavailable|aborted|deadline_exceeded)\].*)$/;
/^Error: (?:RetriableError: (?!\[internal\]).+|ConnectError: \[(?:unavailable|aborted|deadline_exceeded)\].*)$/;
const serverError = "Something went wrong communicating with the server. Please try again.";
interface ReplyState {