I am getting issues where it forgets what it is supposed to be doing, do I need to keep adding @codebase each time I prompt it, note you need to check what it’s suggesting to fix, as it forgets like in this example: It wanted to remove the supabase client etc. Drunnk? Should i switch to o1?
Hey @fusiondev !
There’s definitely an art to driving the models, and it takes some practice to get really good at it, but there are ways you can improve your results.
The way (from my understanding) that Cursor works, is that it attempts to gather the relevant context from your conversation and codebase, and include it along with your prompt, while squashing things down into the maximum allowed context size for the exchange.
Sometimes (especially with a larger codebase) this ‘squashing’ is a hard problem to solve. From experience, I’d be cautious about over-using @codebase as you may just be trying to force too much information into the context window, and end up ‘diluting’ the good stuff. I’ve had best results by guiding it in a focused way, accompanying the prompt with the files I know to be relevant.
The ‘agent’ mode will often do its best to assist with file inclusion automatically – it will search your codebase for things that seem to contain relevant words, and include the top matching files. But for best results, I’d always:
- Make sure there’s a Notepad or text document included in the context outlining your project spec, so it knows where it’s aiming. This can be brief and you can use AI assistance to help generating it, but it helps to keep things on point.
- @-include files you know are relevant to the current bit of the conversation, so it can remain laser-focused on the task at hand.
As for which model, your mileage may vary but I’d doubt o1 is the most effective solution. I rely almost exclusively on Sonnet right now, and it’s been doing a great job on some really large codebases. Giving it the right context seems to be the key.