remix logo

Hacker Remix

Ask HN: Is Cursor deleting working code for you too or is it just me?

75 points by namanyayg 1 day ago | 78 comments

Cursor seems to mess up 3 times a day for me.

What kinds of hallucinations are you seeing?

Any tips on fixing those?

tony 20 hours ago

Keep files <1000 lines. If you can.

Keep chats <30 minutes, ideally 20-minute continuous segments.

Use a `notes/TODO.md` file to main a checklist of objectives between chats. You can have claude update it.

Commit to version control often, for code you supervised that _does_ look good. Squash later.

This glitch often begins to happen around the time you'd be seeing "Start a new chat for better results - New chat" on the bottom right.

If you don't supervise, you will get snagged, and if you miss it and continue, it'll continue writing code under the assumption the deletion was fine: potentially losing the very coverage you'd hope to have gained.

If it does happen, try to scroll up to the chat before it happened and "Restore checkpoint"

claude-3.7-sonnet-thinking, Cursor 1.96.2

namanyayg 13 hours ago

Nice tips! I'm working on a Cursor extension to automate checklist and project spec maintenance.

It improves the context that Cursor has and reduces hallucinations significantly. It's early, but 400 users say it's a lifesaver.

Shoot me an email? hi [at] nmn.gl or cal.com/namanyayg/giga

babyent 18 hours ago

What if..

..I just code it myself?

theshrike79 17 hours ago

You can.

...or you can tell the LLM "write me a go application that adds links from this JSON dump of wallabag.it to raindrop.io" and it's done in 10 minutes.

(It did use the wrong API for checking if a link already exists, that was an additional 5 minutes)

I've been doing this shit for a LONG time and it'd take me a way longer than 10 minutes to dig through the API docs and write the boilerplate required to poke the API with something relevant.

No, you can't have it solve the Florbargh Problem, but for 100% unoriginal boilerplate API glue it's a fantastic time saver.

an_guy 10 hours ago

How do you deal with LLM hallucinating api parameter or endpoints or using imaginary library?

ErikBjare 2 hours ago

You notice it and tell it what to use instead

theshrike79 2 hours ago

Then I write it myself or tell it to correct itself. They tend to be confidently incorrect in many cases, but especially with the online ones you can tell them that "this bit is bullshit" and they'll try again with a different lib.

Works for common stuff, not so much for highly specialised things. An LLM can't know something it hasn't been "taught".

guicho271828 14 hours ago

> Keep files <1000 lines. If you can.

> Keep chats <30 minutes, ideally 20-minute continuous segments.

> ...

Is it just me or does this sound like a standard coding/mentoring practice?

anonzzzies 1 day ago

Yep, it's worse than it was, like the other poster in this thread, i am back just copying to and fro to claude and chatgpt as it just works better.

I am starting to wonder how this will all end up. For instance with API use, we (my company) can burn $100s/day with sometimes insanely bad results all of a sudden. Now I bet I signed away all my rights, but in some countries that doesn't cut mustard for consumers buying things. If an API delivers very solid results one day and crap the next and I spent a lot of money, how does that work? There are many people on reddit/youtube speculating why claude sometimes responds like a brilliant coder and sometimes as if it had a full frontal lobotomy. I see this in Cursor too.

acoard 22 hours ago

I'm sympathetic to the issue of services getting worse, it sucks, but

> If an API delivers very solid results one day and crap the next and I spent a lot of money, how does that work? There are many people on reddit/youtube speculating why claude sometimes responds like a brilliant coder and sometimes as if it had a full frontal lobotomy. I see this in Cursor too.

This seems like an incredible over-reach. There's no predatory behaviour here. You're free to cancel at any time.

It's an incredibly fast moving field, a frontier field in software. To say that, in order to charge for something, you are legally bound to never make mistakes and have regressions, is an incredibly hostile environment to work in. You'll stifle growth if people think experiments might come with lawsuits unless they're positive it leads to improvement.

If they decided they were going to lock everything to gpt-2 and refuse to pay back any people who bought yearly subscriptions, sure I would be agreeable to considering this a bait-and-switch hoodwink. But that is clearly not happening here.

nyarlathotep_ 11 hours ago

How is it possible that users report that but we now see Mr Levels on twitter posting an example of a ThreeJS game thing that he allegedly 100% Cursor'd his way to?

Is behavior that inconsistent?

I've used GitHub copilot plenty, and I've observed various "regressions" and inconsistencies, but I've never come even close to that much of a project being totally LLM-generated.

anonzzzies 9 hours ago

Levels is a programmer though; if you have the patience you can make software like that; you might have to be very precise telling it what to fix when it's stuck and cannot fix it itself, which is then just basically voice coding. Typing is much faster and less frustrating, but you can do it; a non programmer would not be able to though.

jerpint 1 day ago

I’ve been noticing this too. The other day, cursor’s version of Claude sonnet (3.7) added a

with open(file) as f:

  pd.read_csv(f)
This was a mistake not worthy of even gpt3… I’ve also noticed I get overall better suggestions from Claude desktop app.

I wonder why

anonzzzies 1 day ago

I cannot find it anymore, but there is a youtube video of someone making / training an llm who showed a lower precision switch switching his small model from bad to lobotomised and he even mentions he thinks it is what Anthropic does when the servers are overloaded. I notice it, but have no proof. There seems to be a large opportunity for screwing people over without consequences though, especially when using these API's at scale.

namanyayg 16 hours ago

I'm a solo founder in SF building something to fix this, let's talk? Email in my profile

rm_-rf_root 1 day ago

What I’ve learned:

- Use apply (in chat) or composer only if you’re more interested in finding a quick solution than the risk to local code. Often Cursor removes important comments by default.

- Use chat. Create new chats when it doesn’t have the latest version of your code or history/shadow workspace is confusing it. Add relevant files or @Codebase or both.

- Learn to undo. Use git and checkout the files/directories again if needed. I don’t use composer, so files never get deleted.

- Autocomplete is often fairly terrible and regularly gets in the way of trying to see what you’re typing or trying to view. Hit the escape key regularly.

- Use Claude 3.7 for regular coding and 3.7 Thinking for larger things to solve.

lolinder 1 day ago

> Use git

This is honestly the only part of this that matters if you do it right. Use composer, but only on a clean git tree. Apply, then look at the git diff and correct anything you don't like. Test it and commit it, then repeat.

Composer and apply are only dangerous if you're not committing regularly. If you never run them while you have uncommitted changes, you can't lose working code.

siva7 1 day ago

Do careful code reviews after every change by cursor. Do small changes, break up bigger tasks. Be very precise in your instructions. It doesn't replace an experienced developer. Not much different than how a senior engineer would tackle a task. Everything else will result in throw-away spaghetti crap like bolt and similiar-minded frameworks which will collapse in production on day 1 (if you get that far). It's tempting to take it as an autopilot but the results are much better if you treat it as a copilot.

gryfft 1 day ago

> It's tempting to take it as an autopilot but the results are much better if you treat it as a copilot.

As the son of a pilot, this sentence is really funny to me. A real-world pilot would switch the places of 'copilot' and 'autopilot' in your metaphor-- the autopilot maintains course on a given vector but isn't the same thing as a human being in command of the vehicle for exactly the reasons you refer to.

siva7 1 day ago

It's frightening when i think of that Boeing & Airbus are trying to replace the human copilot with AI / computer systems so that in future only one human pilot will command a passenger jet.