Describe the Bug
Cursor keeps throwing in ‘Agent’, ‘Plan’ and ‘Ask mode’ (didn’t try with Debug mode) this ‘MALFORMED_FUNCTION_CALL’ error. I’ve tried prompting it to respect the JSON schema in different ways. That agent thread is pretty much dead and unrecoverable. This leaves work incomplete and also hard to track what’s going on there.
This is so annoying.
Request ID: 7ed2ffb7-742f-4b05-a692-de23968d11da
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Gemini early stop\n\nAPI Error:\n\n\nUnexpected gemini finish reason: function_call_filter: MALFORMED_FUNCTION_CALL\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [invalid_argument] Error
at aou.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12706:475325)
at JXe._doInvokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:23170)
at JXe._invokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:22912)
at JXe._receiveRequest (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:21544)
at JXe._receiveOneMessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:20361)
at mMt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:18388)
at Ce._deliver (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
at Ce.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
at Gyt.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12691:12156)
at MessagePort. (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:15679:18406)
Steps to Reproduce
Run an Agent in cursor with Gemini 3 Pro / Lite. This exception happens very often 1/20.
Expected Behavior
I expect all function calls produced by any cloud LLM supported to work without interrupting the agent with a terminal exception.
Operating System
MacOS
Version Information
Version: 2.3.35
VSCode Version: 1.105.1
Commit: cf8353edc265f5e46b798bfb276861d0bf3bf120
Date: 2026-01-13T07:39:18.564Z (1 wk ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0
For AI issues: which model did you use?
Gemini 3 Pro, Gemini 3 Lite
For AI issues: add Request ID with privacy disabled
Request ID: 0ffbdd58-81c6-4949-b0f3-c586f66fbc44
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Gemini early stop\n\nAPI Error:\n\n\nUnexpected gemini finish reason: function_call_filter: MALFORMED_FUNCTION_CALL\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
————————–
Request ID: 7ed2ffb7-742f-4b05-a692-de23968d11da
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Gemini early stop\n\nAPI Error:\n\n\nUnexpected gemini finish reason: function_call_filter: MALFORMED_FUNCTION_CALL\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [invalid_argument] Error
at aou.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12706:475325)
at JXe._doInvokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:23170)
at JXe._invokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:22912)
at JXe._receiveRequest (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:21544)
at JXe._receiveOneMessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:20361)
at mMt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:18388)
at Ce._deliver (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
at Ce.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
at Gyt.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12691:12156)
at MessagePort. (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:15679:18406)
—————————
Request ID: ec54897d-8037-42e4-95c1-8b55544ec256
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Gemini early stop\n\nAPI Error:\n\n\nUnexpected gemini finish reason: function_call_filter: MALFORMED_FUNCTION_CALL\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
——————–
Request ID: fd05411a-77e0-4b86-8aa3-28c625f5e60b
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Gemini early stop\n\nAPI Error:\n\n\nUnexpected gemini finish reason: function_call_filter: MALFORMED_FUNCTION_CALL\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
———————–
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor