@truell20 here is another video
@truell20 here is another video
Yea, that’s bad. I probably wouldn’t mind if the AI shortens its messages in chat by writing stuff like “// Existing code…” if that results in faster answers. But in the “/edit” process it obviously shouldn’t carry that over. This can probably be improved from Cursor’s side. Thank you for the report!
I lost so much time and work and sanity to this behaviour! Fixing a bug just for Claude or ChatGPT to add in three new (and also old ones by removing work we’ve done before).
I keep giving them the whole codebase just so they stay up-to-date, but it doesn’t help.
Worst thing is, they propose changes to the functionality we’re working on, but when I go through all the proposed changes, there’s stuff in there that has nothing at all to do with what we’re working on.
We really shouldn’t have to add this to our custom prompt:
Never ever remove any portion of my code unless we have explicitly discussed this change.
Never ever remove functionality from my code unless explicitly prompted to do so.
Never ever remove comments or console logs from my code unless changes made them obsolete or I explicitly instructed you to remove them.
Only ever edit the parts of the code we are actively working on. If a function or type or variable or property or whatever isn’t directly involved in the functionality we are working on, leave it exactly as it is!
Hey, it sounds like you could be providing more context than may be needed, which can cause Claude’s performance to suffer from a harsh drop in quality.
I’d recommend trying to keep your context and chat history concise and relevant to the changes you are trying to make, and routinely starting new composer sessions can also help a lot with issues like these!
I guess my post was a bit misleading. I don’t send the whole codebase with every prompt; I used to send just quotes of the lines I wanted to work on, but right now that doesn’t really work anymore, and sometimes Claude seems to be unable to recognise single files attached to a prompt.
I try to keep my prompts short and concise, just giving the exact thing I want, as well as the concrete, direct context of the work we’re doing (not describing the whole project again).
Yet, I still get code deletions, and when I point them out, Claude is like: You’re right, this is the core of the functionality and without it none of the rest of the code makes sense, I shouldn’t have been so eager in my attempt at making the code more elegant.
I never prompted him for elegance or streamlining in that conversation; polishing my code is the last step of my process and I’m still far away from that.
Claude sometimes just… forgets to copy parts of the code when writing a refactored version, or just adds in some deletions in places of the code we weren’t even working on.
I’ve switched to never using the ‘Accept’ button and instead work changes in manually. It’s actually not even more work up front, because I don’t have to parse every single change that’s proposed to figure out if it’s even in the function we’re working on, and it saves a lot of time that I’d otherwise spend thinking there’s a bug in the function I am working on when really, Claude just deleted some random line somewhere else in the code.
This makes some of Cursor’s functions quite unsafe to use, though. Like a butter knife that at random points pokes spikes out of its handle.
Hey, it sounds like you may be having issues with Cursor’s apply functionality, which takes a change recommended in the Composer, and actually implements the change in the code itself, would you say that is correct?
Alternatively, it could be the composer itself making bad code change suggestions, but this would be more clear than the Composer is missing context or is confused!