In all of the Agent’s responses, a final character is always missing. And the UI displays “Running”.
After about 30 seconds, the final character is added, and only then can the user continue the conversation.
Steps to Reproduce
Open a new chat. Choose any model.
Send any message.
As shown in the attached video, the AI responded to almost all messages except “!”. The conversation remained frozen, and I couldn’t continue chatting. After about 10 seconds, it finally added the “!” mark, and only then did the agent turn end.
Expected Behavior
The model responds to the stream continuously and does not freeze.
Screenshots / Screen Recordings
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
So just to confirm, this “last character” behavior happens when using HTTP 1.1? What happens when you use HTTP 2 (is there a specific error message? Just stalling?)
@Colin, HTTP2 has been unstable lately. As you know, the Cursor frequently gets stuck at “planning next moves” (discussed in another thread). We couldn’t use HTTP2, so we switched to HTTP1.1.
At the time of writing, HTTP2 works fine, and the stream is good.
But HTTP1.1 is still experiencing this issue:
requestId with shared data:
fb612255-da90-4471-9212-a692f87728a3
Note that I have turned off all VPNs and firewalls. I’ve tried changing my internet connection… but nothing has worked.
Could it maybe be because emojis cannot be displayed in your chat window? Sonnet likes to finish its responses with emojis and if they cannot be rendered it might seem like a part of the response is missing?
@Colin I just downgraded Cursor to do some tasks. I’ll upgrade and send you the request ID soon.
However, one thing I’m fairly certain of is that when I enter a custom OpenAI URL, it gets blocked by the backend cursor most of the time when using HTTP/2.
If the URL has the domain: api.openai.com, the request is OK.
If the URL is different, it will mostly be blocked and cause a stuck error.
Switching to HTTP 1.1 makes everything OK, but it will cause a “last character” issue.
Currently, I’ve downgraded to 2.2.44, and everything works well, including HTTP2 and the custom API, no “last character” issue (on both http 1.1 and 2)
Thanks for providing those Request IDs. Looking into the logs, I can see that you’re overriding the OpenAI Base URL to use your own model.
It looks like in the cases where your requests are failing, the custom endpoint is returning 400/500 errors. There’s really not much that can be done about that from our side. If you have access to the logs of that endpoint, you should investigate why those requests are being rejected.
Does switching to HTTP 1.1 and not using a custom endpoint give you the last character issue? That would help clarify if it’s an issue with Cursor, or an issue with your hosted model.
Does switching to HTTP 1.1 and not using a custom endpoint give you the last character issue? That would help clarify if it’s an issue with Cursor, or an issue with your hosted model.
Yes. The problem exists in the default settings as well (not using custom endpoint)
At that time, some requests was stuck at the Cursor instead of being sent to the endpoint.
No requests were sent to the endpoint (i checked logs at that time).
Furthermore, I changed the endpoint just to make debugging easier. Even after disabling the custom API, the issue above still occurred.
This went on for a long time. But it seems to have been fixed, as many people reported the “stuck planning next moves” issue.
since I updated to 2.3.35, everything has worked fine. i think this issue has been fixed in 2.3.35. All issues resolved: HTTP/2 stuck; HTTP/1.1 last character on both default/custom endpoints is no longer encountered.