Generates wrong Mac commands with & instead of a simple &
What happened?
All commands are generated wrong.
Eg
cd src/frontend && npx shadcn-ui@latest add progress
Instead of
cd src/frontend && npx shadcn-ui@latest add progress
And it is hard to teach cline that it is using outdated commands:
The 'shadcn-ui' package is deprecated. Please use the 'shadcn' package instead:
npx shadcn@latest add progress
For more information, visit: https://ui.shadcn.com/docs/cli
Steps to reproduce
Relevant API REQUEST output
Operating System
macOS 15.3.2
Cline Version
3.8.3
Additional context
No response
Same for Linux (ubuntu)
@udiedrichsen we are looking into this issue. In the meantime, I've solved this on my end by adding the following to the Custom Instructions:
When running terminal commands, never use "&" to represent "&"
I am getting this only with latest gemini 2.5. I investigated this with gemini and got an answer that LLM is confused by the fact that tool call is an xml block and so it automatically escapes ampersands for proprer xml :)
Unfortunately I can confirm that this workaround "When running terminal commands, never use "&" to represent "&""does not work consistently on Gemini 2.5 - it does reduce the error but does not remove it completely.
same here... I don't understand why this isn't a priority for anyone else. Are others not experiencing this result?
The thing is ... this is problem of LLM... OR confusing standard yet this would require full rewrite for all tools. It seems tool calling schema is XML-like yet there is no requirement to escape which actually is binary - and for some LLMs this may be super awkward to generate actually invalid XML.
One option could a a switch for the tool calling schema - per model to use full escape mode
Hey guys, we pushed a fix on Monday. Please try again, it should be fixed as of the latest version.