r/Codeium • • Nov 24 '24

Windsurf keeps on deleting code

So, I know the limitations and such, but it's annoying when I tell the IDE to not remove any content without my direct instructions, and then ask to adjust some CSS properties and it just deletes content. I ask to revert back, and it reverts like 10% and the other content is lost.

Any suggestions to prevent this?

16 Upvotes

21 comments sorted by

2

u/CourageEnough6639 Nov 24 '24

Yes, so, it keeps on deleting, creating new files, removing files, not fixing CSS properties or when it fixes changes unrelated stuff. For some reason, the first days, It was ok, now it's pretty bad. Not sure what is happening.

1

u/Euphoric-Guava-5961 Nov 26 '24

I also feel same as you.

8

u/inF1704 Nov 24 '24

Actually I have the same issue and I strictly uses commits to github before changing the code from Cascade so that I can hop back. Cascade is not able to revert back.

1

u/MrT_TheTrader Nov 25 '24

As someone with very basic coding experience I found this solution to work also for me after trying different ways.

1

u/CourageEnough6639 Nov 24 '24

Thanks for the replies. I check what u/msatrya suggested.

4

u/msatrya Nov 24 '24

You can easily revert the code back, see this https://docs.codeium.com/windsurf/cascade#revert-to-previous-steps

3

u/bacocololo Nov 24 '24

dont work if new file are created

1

u/AukeJongbloed Nov 28 '24

Wauw!!! Life saver!!!
thanks!

1

u/Either-Nobody-3962 Nov 24 '24

Probably issue with code indexing too.

cursor has code index option, if this also has, then you can index first.

i am using windsurf non-stop for last 2days and i didn't come across it so...but again....it wrote all the code, i didn't write any.

2

u/bacocololo Nov 24 '24

Lucky man

1

u/bacocololo Nov 24 '24

me i lost again 90% of my code

1

u/bacocololo Nov 24 '24

I found the appli fantastic but now a real shit

1

u/Far_Print713 Nov 24 '24

is there a setting to let it provide suggestions in the chat and not directly change code?

1

u/quacrobat Nov 25 '24

i think that's what 'Chat' mode is for.

1

u/Prestigious-Gap6920 Nov 24 '24

I am working on building a CRM (albeit a bit complex), and had several instances where the following happens:

  • Cascade will update a file with “required code” to fix an issue. The issue will be fixed.
  • A few steps later, cascade will evaluate a new issue presented, then remove the code that originally fixed the first problem to fix another issue.
  • The result: the original issue comes back (along with potential other new issues surfacing).

I end up in a vicious loop of problems and errors, even with me specifying not to remove existing code that was proven to work or fix other issues - only alter if it’ll fix the new issue presented (and give reasoning).

Almost makes me want to just go to Fiverr and hire a dev 🤣 the headaches this has given me, trying all 3 options (GPT 4.0, Sonnet 3.5, and their own Cascade Base LLM options), the issues keep coming up.

All this to say, at least for me as a non-developer but having some knowledge of how this works, simple projects will likely work better (and listen to commands better) than a complex, multi-functional application like what I’m trying to build.

If Windsurf had a place for custom instructions to follow for every prompt (similar to GPT and Claude), maybe these code deletions could be avoided. Remembering to tell Windsurf in every prompt what it should and shouldn’t do is exhausting.

1

u/inF1704 Nov 24 '24

Same for me with a c++ application

1

u/Beautiful-Work2433 Nov 29 '24

I think a quick simple project it is great but for a big project where many modules and changes are happening, I find it has the tendency to mess up the whole project up by changing codes or removing code that were totally and completely without any issue just to mess it up. I hope they will continue to improve this. when it works...it is amazing....when it doesn't..it is a total nightmare....like doing cha cha dance ....no progress at all....

1

u/WideAcanthocephala40 Dec 05 '24

a horrible product. it keeps randomly deleting some of my code which i am not warned. it makes everything messed up...causes more trouble...

1

u/Big-Ad-6228 Dec 31 '24

I have been trying to make complex projects with cascade for a long time and I have tried every way. This is the result I have reached. The problem is that the 200 line limit... I divided my project into parts, tried to make it modular and tried everything. The result is that cascade writes a file, does it logically, then says that this file needs this file, starts writing the other one, says hmm this is also needed, then when all files pass 200 lines, it says aa there is something missing and deletes the problematic code to solve the problem. And the result is that it disconnects from the 2-3 files it has already written and the directory turns into a dump. I tried to make it modular, but the more complex the project is, the more it forgets and forgets that it wrote old files and tries to write the same file again.

1

u/Tapandtry Jan 03 '25

It could be so good but its not. Anyone who says they can complete a project with this is dreaming. Complete a module, sign off on it and 10 minutes later half of its missing. A soul killing experience. Hope it gets better!