Serialization error

Hi everyone, the next update will contain a bugfix for serialization issue.

If you still encounter the serialization issue after that please include in your report the Request ID with privacy disabled so we can look into the details Getting a Request ID | Cursor Docs

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After the latest update (this wasn’t happening before):

Upon executing an executable in powershell and trying to see the output:

ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:7337:396432

Steps to Reproduce

Agents running in this repo must build and test changes before moving on. This involves running powershell make script and then executing the built binary, in this instance is a vulkan graphical program launched from the terminal for benchmarking.

Operating System

Windows 11

Current Cursor Version (Menu → About Cursor → Copy)

(Same as OP)
Version: 2.0.54 (system setup)
VSCode Version: 1.99.3
Commit: 7a31bffd467aa2d9adfda69076eb924e9062cb20
Date: 2025-11-03T22:40:44.657Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

All models, all chats

Does this stop you from using Cursor

Yes - Cursor is unusable

Findings

  1. Exit code: -1073740791 (0xC0000409, STATUS_STACK_BUFFER_OVERRUN). The program crashed, not a normal exit.

  2. Output is empty. The program crashed before producing output.

  3. JSON serialization succeeds for this single command. The output isn’t the problem.

  4. The serialization error occurs when sending the next request to the AI server, not during command execution.

Insight

The issue likely comes from accumulated context from multiple tool calls. Logs show:

  • 33 terminal commands executed before the serialization error

  • Errors appear when sending the next request (includes prior tool call results)

  • The failure is likely in the cumulative request payload, not a single command

Hypothesis

When Cursor builds StreamUnifiedChatRequestWithTools, it includes:

  • All previous tool call results

  • Tool call metadata (IDs, timestamps, etc.)

  • Conversation history

  • Context from multiple commands

After many terminal commands, this payload may:

  • Exceed size limits

  • Contain circular references

  • Include unserializable metadata

  • Have structural issues from accumulated state

I have run both cmd.exe and powershell based solutions, I have also run the commands sand-boxed to see if any dodgy characters are causing the problem. I have a 2nd cursor window open monitoring the log files of the first to figure out the pattern.

Anything else you guys might need to diagnose this and fix it? Basic commands and executables with no output function fine, but this c++ graphics process seems to somehow cause cursor to have issues.

The request ID isn’t going to be useful for you because the local serialization fails and never sends the next request.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I am reporting a critical issue that started immediately after I installed Version 2.0. The application has been completely unusable for two days, severely impacting my ability to work.

Detailed Problem Description
Version 2.0 Failure (Initial Install):

The application’s history feature kept loading and freezing.

Troubleshooting: Uninstalling and reinstalling V2.0 did not resolve the freezing issue.

HTTP/1.1 Workaround Failure:

Action: I changed the protocol setting to HTTP/1.1.

Result: The application loaded, but the prompt functionality failed with a persistent error: “Connection failed. If the problem persists, please check your internet connection or VPN.”

V1.7 Downgrade Failure:

Action: I uninstalled V2.0 and reinstalled the stable Version 1.7.

Result: The “Connection failed” error persisted even on Version 1.7.

This problem is unprecedented; I have never experienced a connection failure before the V2.0 update.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Connection failed. If the problem persists, please check your internet connection or VPN
Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools [internal]

Steps to Reproduce

Enter prompt

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.54 (system setup)
VSCode Version: 1.99.3
Commit: 5c17eb2968a37f66bc6662f48d6356a100b67be0
Date: 2025-10-21T19:07:38.476Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Auto

For AI issues: add Request ID with privacy disabled

(Request ID: 3ae1b8dc-bd9d-4ffa-ac92-9102ed61f3d2)

(Request ID: b0e342d6-5240-4cc5-9748-78ebfd6eb885)

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey @KahWai, I’m happy to help troubleshoot. Just to be certain that I understand the problem right, are you seeing the loading/freeze when opening an existing chat thread from the history, or does it also happen in a brand‑new chat?

A couple of other details that can be helpful to troubleshoot further:

  • Which mode are you using when the problem occurs? (Agent, Plan, Ask)?
  • Have you run Network Diagnostics (Cursor Settings → Network → Run Diagnostics) and does it show all green?
  • Does the issue persist after disabling extensions (cursor --disable-extensions) and fully restarting Cursor?

I see that you provided a request ID as well, which is great. A staff member may be able to look it up and share any insights. Let me know what you find in the meantime.

  • Which mode are you using when the problem occurs? (Agent, Plan, Ask)? >> Agent only.

  • Have you run Network Diagnostics (Cursor Settings → Network → Run Diagnostics) and does it show all green? >> Yes all green.

  • Does the issue persist after disabling extensions (cursor --disable-extensions) and fully restarting Cursor?>> It’s seem not helpful. Disabled extension and re-open cursor, same error happen.

Same here…

agora deu
Request ID: e55d49f3-ecf4-48e2-8600-f508dc31b5b1
ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/Users/lvianna/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4989:396432

Version: 2.0.64 (user setup)
VSCode Version: 1.99.3
Commit: 25412918da7e74b2686b25d62da1f01cfcd27680
Date: 2025-11-06T04:35:14.424Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

Is there any help after a day posting? Looks like we need to say bye to Cursor.

You gotta specify the version bruh.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor IDE shows permanent “Connection Error” and fails to stream model output despite valid connection.

Additionally, when switching network settings (HTTP/2 disabled → HTTP/1.1 or HTTP/1.0), Cursor throws an internal serialization error:

“ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools”

So:

  • Cursor shows connection failed,

  • The backend responds,

  • Streaming/WebSocket/tools layer crashes.

This has persisted for 14+ hours across reinstalls and multiple different networks.

Steps to Reproduce

  1. Open Cursor IDE.

  2. Start any AI streaming action:

  • Immediately, the UI shows a persistent: “Connection Error: Connection failed. If the problem persists, please check your internet connection or VPN.” error.

  • Meanwhile, the backend shows successful responses:
    [AGENT] Starting stream
    Response: ‘foo’ in 122ms

    [CHAT] Starting stream
    Response: ‘foo’ in 127ms

…but the Chat UI never streams the response, implying streaming transport (WebSocket / HTTP2) failure, not a connectivity failure.


Network protocol tests:

Settings → Network → Disable HTTP/2 / change protocol

Tried:

  • Disabling HTTP/2

  • Switching to HTTP/1.1

  • Switching to HTTP/1.0

After switching from HTTP/2, Cursor throws a new error:

“Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools”


Troubleshooting (no improvement)

Tried:

  • Full reinstall (including deleting AppData local state)

  • Rebooting PC

  • Testing on multiple networks

  • Ensured no VPN

  • Ensured no proxy

  • Ensured no corporate firewall

  • DNS reset + network flush

Streaming still fails.

Expected Behavior

Streaming responses should appear in the chat UI without showing a “Connection Error” warning.

Cursor should:

  • Recognize that the backend is connected,

  • Display streamed tokens,

  • Not throw serialization errors when switching transport protocols.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.64 (system setup)
VSCode Version: 1.99.3
Commit: 25412918da7e74b2686b25d62da1f01cfcd27680
Date: 2025-11-06T04:35:14.424Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.22631

For AI issues: which model did you use?

Claude Sonnet 4.5 (Thinking)

For AI issues: add Request ID with privacy disabled

  1. (When on HTTP/2) Request ID: 1f0625f8-2fab-4d61-b691-27d607b506aa

  1. (When not on HTTP/2) Request ID: e4ace6d5-6be8-4a1e-923d-ed2725706db4
    ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
    at vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4989:396432

Additional Information

Although I marked “Cursor is unusable,” I want to clarify the context:

Cursor obviously still allows manual code editing, but the reason I use Cursor is for AI agent functionality and streaming output. Because streaming and tool-assisted responses are completely broken, Cursor is effectively unusable for its intended purpose in my workflow, and I therefore marked it as “unusable” below.

Additionally I also verified system status at https://status.claude.com/ and they had reported “Elevated errors for requests to Claude 4 / 4.5 Sonnet / 4.5 Haiku”, with the status progressing through Investigating → Identified → Monitoring → Resolved.

The status page now marks the incident as resolved, indicating that the service should be functioning normally. However, despite the resolution on their side, Cursor is still unable to stream responses. I continue to get the same serialization failure (StreamUnifiedChatRequestWithTools) and the persistent “Connection Error” banner.

Does this stop you from using Cursor

Yes - Cursor is unusable

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Almost all Agent runs are crashing with this:

“Connection failed. If the problem persists, please check your internet connection or VPN.”

Nothing helps. I tried switching to HTTPS 1.1, clearing cache, restarting, disabling HTTP/2 - same result.

The only way to keep working is to start a new chat and lose all context, which makes the Agent basically useless.

It used to happen once in a while, but now it’s constant. A few more days like this and I’ll have to move to another IDE because it’s impossible to work like that.

This problem seems to be well known, but still no fix or clear update from the dev team. Is there at least a confirmed plan to patch it soon?

Steps to Reproduce

Steps to Reproduce:

Open any project and start a chat with the Agent.

Run a few tool-based commands (for example: ask the Agent to analyze or edit multiple files).

While one Agent task is still running, trigger another one in parallel.

Within a few seconds, the chat fails with:

Connection failed. If the problem persists, please check your internet connection or VPN.

The Agent disconnects, and the session can’t be recovered. The only workaround is to start a new chat, which resets all context.

Expected result:
Agents should handle multiple parallel tasks without crashing.

Actual result:
Almost every time more than one Agent runs, the session fails with a connection error and loses context.

Expected Behavior

Multiple Agents should be able to run at the same time without disconnecting or crashing.
Each Agent task should complete normally and keep the shared chat context active so I can continue the session without losing progress.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.69 (user setup)
VSCode Version: 1.99.3
Commit: 63fcac100bd5d5749f2a98aa47d65f6eca61db30
Date: 2025-11-07T18:21:29.650Z (2 days ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Sonnet 4.5

For AI issues: add Request ID with privacy disabled

Request ID: fcaac03e-2d20-4be4-8250-d1b36e89130c
ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/Users/veigdab/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4989:396432

Does this stop you from using Cursor

Yes - Cursor is unusable

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Request ID: c46d934c-8a7b-4de8-9873-aa2caa000d38
ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/Users/user/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:5003:401517

Steps to Reproduce

Hello,

When I try to start the Agent in Cursor I immediately get the following error:

Request ID: 52a6d36e-4799-479a-b113-dda5ecfdd26c
(or sometimes Request ID: c46d934c-8a7b-4de8-9873-aa2caa000d38)

ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/Users/user/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:5003:401517

The Network Diagnostics panel shows that DNS/HTTP2/SSL/API checks pass, but Ping/Chat/Agent fail with NGHTTP2_REFUSED_STREAM.

Environment:

  • Cursor version:
  • OS: Windows 11 x64
  • No VPN or proxy enabled
  • Steps tried: clearing site data via DevTools, restarting Cursor, reinstalling.

Please let me know how to resolve this issue.
Thank you!

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.0-pre.20.patch.0 (user setup)
VSCode Version: 1.99.3
Commit: 6813f14803d5e39b0c6baf2d99c097212d3f59d0
Date: 2025-11-10T08:17:05.518Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Yes - Cursor is unusable

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

tl;dr There’s a bug in agent command output parsing that reports itself as a connection error, thereafter breaking the chat session and potentially re-breaking future sessions.

There is a specific set of issues here that needs to be addressed rather than worked around by the end user, because it can render Cursor unusable and/or is disruptive. This is what I’ve observed (OP can confirm):

Some agent-run commands seem to take inordinately long and then report connection timeouts in the UI. It may be model-dependent, but I use Auto as much as possible. For me, it happens most when running tests with failures for React / Jest, where the test output contains a bunch of DOM elements. It could be a coincidence or something to do with parsing. In the dev tools log, I see an auto-bug report generated for request ID 35354a4f-1173-43d8-853c-efde74c44176. Hopefully someone at Cursor can pull that up and look.

This is the actual stack trace. It is not really a connection timeout, despite the popup:

workbench.desktop.main.js:2750 \[composer\] Error in AI response: undefined ConnectError: \[internal\] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at workbench.desktop.main.js:4989:396431Caused by: Error: invalid int 32: 4294967295
at u6n (workbench.desktop.main.js:441:32634)
at N2a.int32 (workbench.desktop.main.js:442:12763)
at uMt (workbench.desktop.main.js:442:19797)
at B2a (workbench.desktop.main.js:442:18900)
at Object.writeMessage (workbench.desktop.main.js:442:16664)
at ssi.toBinary (workbench.desktop.main.js:441:34677)
at U2a (workbench.desktop.main.js:442:19718)
at B2a (workbench.desktop.main.js:442:18998)
at Object.writeMessage (workbench.desktop.main.js:442:16664)
at Iti.toBinary (workbench.desktop.main.js:441:34677)
at U2a (workbench.desktop.main.js:442:19718)
at B2a (workbench.desktop.main.js:442:18998)
at Object.writeMessage (workbench.desktop.main.js:442:16664)
at sai.toBinary (workbench.desktop.main.js:441:34677)
at workbench.desktop.main.js:4989:396402

Thereafter, if I click “Try Again” it will usually try again, possibly incurring additional charges, possibly undoing a lot of work, and almost always getting to the point of needing to run the tests and repeating the behavior, leaving me stuck.

If I click “Resume” It will sit literally forever in “Planning next moves.” Looking at the console at this point, it appears as though it fed the same problematic context into the model, got the same stack trace, but instead of translating the stack trace into a popup connection error, it swallowed the error. At this point, the chat is no longer usable. Forking the chat is no longer possible.

Closing and reopening Cursor temporarily fixes the problem (I believe it rolls back the context), but again, if it steps on whatever landmine was causing the issue, I’m in the same boat.

Steps to Reproduce

I do not have repeatable steps. It seems possibly peculiar to one model (I use Auto) and triggered by particular command output. I will gladly provide request ids or other diagnostics

Expected Behavior

Ideally all command output should be sanitized and accepted by all models. As a fallback, failure in output parsing should fallback gracefully and perhaps instruct the model as to what happened so it can avoid that command.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77 (system setup)
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.22631

For AI issues: which model did you use?

Auto

For AI issues: add Request ID with privacy disabled

35354a4f-1173-43d8-853c-efde74c44176

Additional Information

This has been happening through several versions. I believe others are seeing it but reporting it as connection issues.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

I encountered this while using composer-1. I do think the model is important, as it may be choking on inputs, triggering the behavior.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

i keep getting:
Connection Error
Connection failed. If the problem persists, please check your internet connection or VPN

Request ID: d7fc95a9-5150-4d62-91af-baa1beb1850c
ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:6331:404567

Steps to Reproduce

just run any prompt - but it usually comes a few minutes after starting a new chat (which i keep having to do - hugely annoying). it might go away for a minute, but it always returns and stops cursor completely. problem started about two hours ago. didn’t change anything i was doing.

Expected Behavior

the prompt should work - and i should get an answer.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.36 (system setup)
VSCode Version: 1.105.1
Commit: 9cd7c8b6cebcbccc1242df211dee45a4b6fe15e0
Date: 2025-11-26T03:43:48.079Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

mostly using opus 4.5, but same problem with Auto.

Does this stop you from using Cursor

Yes - Cursor is unusable

I found the solution: https://x.com/ExpLang_Cn/status/1998614232292606008

Request ID: fa95d827-938c-473d-a309-b4dc64577af0
ConnectError: [internal] Serialization error in aiserver.v1.StreamUnifiedChatRequestWithTools
at vscode-file://vscode-app/c:/vs/workbench/workbench.desktop.main.js:12155:452075

Cursor Agent sometimes runs Windows PowerShell verification commands that truncate output via a pipeline, e.g.:

npm run check 2>&1 | Select-Object -First 30

When Select-Object -First N has read enough lines, it stops consuming the pipeline and PowerShell aborts the upstream process/pipe. For external processes this frequently sets:

  • $LASTEXITCODE = -1

Cursor then tries to include that terminal result (including exit code) in a protobuf request (e.g., StreamUnifiedChatRequestWithTools). Somewhere in the serialization path the exit code is treated as an unsigned 32-bit value, so -1 becomes 0xFFFFFFFF = 4294967295, which is out of range for an int32. Result:

  • Local serialization error: invalid int 32: 4294967295

  • UI shows “Connection failed…” and “Try again” loops forever with no network request, because it fails before sending.

Fix options (Cursor developer-side):

  • Ensure tool/terminal exit codes are stored/serialized as signed int32 (or int64) without unsigned casts.

  • Clamp negative/out-of-range exit codes to a safe value before serializing.

  • Treat -1 (pipeline-aborted) as a known/special case.

Same issue here, and before that .. my last chat had a huge lag during conversation.