When there is a syntax error, message not send to model

I noticed whenever there is a syntax error in the code and I want to follow up the error in the composer chat it’s not sending the message to the model at all (just generating it says) but never a response from a model.

When I copy paste the code lines in a new composer it does reply, however when using the actual file as context it won’t send anything to the model.

Hey, have you got a screenshot with an example of this we can take a look at?

Hi, does this help?
Strangely when going into chat, instead of composer it does respond.
So seems related to composer only.
Also chat is able to resolve the syntax error but the composer is not able to, while all code was provided by the composer, so not my own code.

Developer tools after sending message:

[MCPService] Getting servers: length: 0[[Prototype]]: Array(0)at: ƒ at()concat: ƒ concat()constructor: ƒ Array()copyWithin: ƒ copyWithin()entries: ƒ entries()every: ƒ every()fill: ƒ fill()filter: ƒ filter()find: ƒ find()findIndex: ƒ findIndex()findLast: ƒ findLast()findLastIndex: ƒ findLastIndex()flat: ƒ flat()flatMap: ƒ flatMap()forEach: ƒ forEach()includes: ƒ includes()indexOf: ƒ indexOf()join: ƒ join()keys: ƒ keys()lastIndexOf: ƒ lastIndexOf()length: 0map: ƒ map()pop: ƒ pop()push: ƒ push()reduce: ƒ reduce()reduceRight: ƒ reduceRight()reverse: ƒ reverse()shift: ƒ shift()slice: ƒ slice()some: ƒ some()sort: ƒ sort()splice: ƒ splice()toLocaleString: ƒ toLocaleString()toReversed: ƒ toReversed()toSorted: ƒ toSorted()toSpliced: ƒ toSpliced()toString: ƒ toString()unshift: ƒ unshift()values: ƒ values()with: ƒ with()Symbol(Symbol.iterator): ƒ values()Symbol(Symbol.unscopables): {at: true, copyWithin: true, entries: true, fill: true, find: true, …}[[Prototype]]: Object
workbench.desktop.main.js:1015 [MCPService] No connected servers found. Server statuses:
getToolsForComposer @ workbench.desktop.main.js:1015
await in getToolsForComposer
(anonymous) @ workbench.desktop.main.js:2823
await in (anonymous)
submitChatMaybeAbortCurrent @ workbench.desktop.main.js:2823
await in submitChatMaybeAbortCurrent
ut @ workbench.desktop.main.js:2849
await in ut
onClick @ workbench.desktop.main.js:2849
(anonymous) @ workbench.desktop.main.js:2848

To be clear, if you have no syntax errors, this always works, but if you introduce one, it no longer functions?

Correct, composer works fine unless there is a syntax error in the file, then any message is no longer send to the model it seems (I tried all models) when sending a message from Chat it does reply.

Do you have a file / example project you can send over that triggers this every time for you? I’ll download it and try to reproduce!

Can be a simple test script, like this, which also doesn’t work.

<?php

function greet(name) { // Missing $
    echo "Hello, " . name . "!"; // Missing $
}

if (true { // Missing closing parenthesis
    echo "This will always run!";
} else 
    echo "This is an else without braces!"; // Should be wrapped in {}

echo "Unterminated string // Missing closing quote

$array = [1, 2, 3
echo $array[0]; // Missing closing bracket

?>

Hey, if you disable all your MCP servers, does that make a difference? I have trie that script and it is working fine.

Also, can you try run in safe mode using cursor --disable-extensions and see if you are able to submit your prompt then?

Hi,
Tried starting in this mode cursor --disable-extensions (it confirms extensions are disabled) however the same issue.

I don’t use any MCP servers (I see it in the settings but none was ever added)

I’m using windows 11 / cursor 0.45.11

To be sure, this only happens when it’s in a file, and you follow up with the file.
Copy/pasting the code in the composer does work to send.

And are there any errors showing in the developer tools, with extensions disabled? A screenshot may be helpful here!

Hi, it shows this.
However in other cases no issues. and it responds properly.


Schermafbeelding 2025-02-15 155657

Request ID: 3badc02b-89a0-46a5-8095-64e2e359b9c1

I can’t find a good reason for these requests erroring!

Does this happen every time you try to use the composer with a syntax error, or just occasionally? Also, does clearing your cache make any difference?

Hi, yes when there are syntax errors it happens with any script in composer.

Update: I used this latest guide to clear the cache:

The guide says code folder but there is also a cursor folder in my case.
C:\Users\AppData\Roaming*Code*\

I believe it started working after deleting the CachedData folder, but maybe deleting the others is also needed. Anyway you may have to set up cursor again.

Hi, another update to this, I think I figured out the issue only happens when this in settings.json:
"php.validate.executablePath": "C:\\php\\php.exe"
Or Xampp, same issue. Only first time of using it, it seems to work. When you retry it does not.

The path is correct. When removing it from settings and using php Intelephense instead, it does work correctly.

Thanks for figuring this one out, glad you got it working! I’ll log this down to look into properly in the future.