When I asked cursor to generate an SQL statement, the comments and some syntax for greater than and less than in the final generated SQL statement were incorrect, such as the comment start symbol being<! --What is actually generated is<! –
Steps to Reproduce
Just need to request the generation of SQL or generate some SQL with=>or<=
Expected Behavior
For example,<! --Or<
Screenshots / Screen Recordings
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
This sounds like it’s most likely something with the model itself—specifically how it’s handling certain SQL syntax characters like <, >, and comment delimiters (<!--). These are special characters that can sometimes get escaped or transformed incorrectly.
Could you share the request ID from when you’re seeing this behavior? You can get that by reviewing the docs here.
Potential workaround: You could try adding more explicit rules to your Cursor rules to correct the behavior. For example, you could add something like:
“When generating SQL, always use standard SQL comment syntax: -- for single-line comments and /* */ for multi-line comments”
“Ensure comparison operators (<, >, <=, >=) are written exactly as shown without HTML escaping”
Of course, this can probably be solved, but I hope it can fundamentally solve this problem. After all, this is very important to me, and cursor has become an essential tool for my daily life