Think horses, not zebra

Cursor seems far too eager to match an error to a previously known error, and then tries to work around that condition, without checking that it’s actually trying to solve the correct problem.

I was working on creating some Behat (browser) tests for the web frontend.

Cursor couldn’t see the file upload form that I wanted to test, and it started doing a whole lot of “workaround” code. That code was written on an assumption that the reason that it couldn’t see the upload form was that the frontend was being re-rendered by React constantly, and so that the reference to the file input div kept being recreated.

That was not the cae.

The code that was confusing Cursor looks something like this:

if (user.is_logged_in()) {
render_file_upload_form();
}

i.e. if the user is not logged in, the file upload form is never going to be visible.

Does anyone have any suggestion on telling Cursor to only write workaround code when it has some evidence of that being the problem?

It did something very similar the next day, when I encountered another issue (in the testing framework, files need to be referenced using the complete path, not relative path) and again Cursor spent a whole lot of time trying to fix a different problem, rather than saying “it’s not working, I’m not sure why”.

Hi @Danack and thank you for your discussion points. Cursor Rules can help to guide Ai towards the right approach.

Have you already used Debug Mode? Also when you say Cursor, which AI model do you mean?

In case you need help please post in Support > Help or Support > Bug Reports

I haven’t. I will try that the next time the agent is struggling to overcome something not working.

Also when you say Cursor, which AI model do you mean?

I have left that setting as auto, so I am not sure what was being used.

I think I have two of the request IDs:

ef2b614f-7c45-458b-8d0d-8787bb1da588
70107f52-1a49-4ec4-917b-9ddaa37f689c

Is it possible for me to look up which models were used?

Thank you for the details. Auto does not display models. Let me know how debug mode goes when you encounter issue again.

1 Like