I definitely feel your frustration, it can be a tricky beast to handle – as you rightly say, this is especially true when the context starts getting too full.
From my understanding (I could be wrong, I don’t work for Cursor), the understanding is going to be limited by the training of the external models like Sonnet, which is out of Cursor’s control. But the Cursor models are responsible for pulling your codebase into context wherever possible.
If there’s a library or framework it’s not doing well with, try using the @Web approach to make it read the docs for that, that can help.
Notably though if you’ve got to the point where you’re going round in circles (especially for hours, ouch, I feel your pain!), it definitely sounds like you’re hitting conversation context issues. Try reading through the Idiot’s Guide To Bigger Projects (disclaimer – I wrote it and the idiot is me). It’s a few minutes read, but it might help you get away from the “circular” issues; it mentions that specifically.
Also do make sure you get the hang of selectively adding files to your context when you prompt. it’ll automatically include the ‘current’ file, although be aware that that will change if you switch between files in the editor. You can just do @src (or whatever your main source dir is) to try to include everything, but that can muddy things with irrelevant information for your query. I always refine the included files list every time I prompt, and it seems to help a lot.
Hang in there, it is definitely possible to use the app for building ambitious projects and keep those issues to a minimum (first hand experience), but it does take some practice to get the most out of it. Best of luck!