What kinds of hallucinations are you seeing?
Any tips on fixing those?
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
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.
- 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.
In the one hand it’s impressive how quickly I could make a basic UI, on the other hand it’s quite unimpressive my ability to get the Ui to actually do anything, and the number of very basic mistakes (whoops, forgot to add types or here let me import a file that doesn’t exist)
I even had a weird thing where it asked me to paste in the code of a file, even though the file was explicitly added to its context.
Just today, I asked Sonnet 3.7 to use the app's accent color, which can be found in the @global.css, to apply it to some element. It went on a massive tangent, scanning all sorts of documents, etc. I then asked Sonnet 3.5 for the same thing, and it simply took the accent color and applied it. No tangent, no grep, ...
Keep the input minimal. Keep a set of gold standard tests running in a loop to catch problems quick. Don't tune out. Debate whether you really need to use that new model you haven't worked with that much yet just because it's newer. And double check you aren't being sold e.g. a quantized version of the model.
If it goes off track I put a rule in there. It’s like a junior developer that I have to keep constraining it to project goals, coding styles and other aspects.
I have different files in there to help with being able to reuse rules for different projects.
Overtime it’s getting better at staying on track.
I use Aider for side projects (with Claude) and for some reason it will also delete working code when making a partial correction. It just throws out the good with the bad when I suggest something.
There's definitely shift between versions of cursor. One time I had an unpleasant crash that also upgraded the version, and suddenly .cursor/ files I thought were working (but hadnt been) showed up mid prompt, and derailed the entire composer run.
I've tried ideas ranging from TODO documents, append-only work logs, blueprint documents, faux-team interactions through role definitions, and much much more.
The most success I've had is by adding manual lines at the end of every prompt, akin to phrases like "be respectful of the existing code and functionality, make deliberate changes with caution and consideration". Beyond the normal "plan and take it step by step" type phrasing.
It would also be nice if .cursor/ rule files actually were actively used, instead of sometimes being hooked in if you wrote the description right.
Sometimes I have great success at utilizing specialized roles, with named team members and explicit direction, to elect the "appropriate" role for the items being worked on, and discuss pros/cons and facilitate brainstorming.
At the end of the day, I think I end up doing an annealing pattern for changes:
- Build the features and breaking is okay so long as we get the features.
- Distill the built features into a doc with examples and roll back the code by git.
- Build a v2 based on the distillation.
- Rinse repeat, usually until v4 or v5, when i tear it all down and write it 99% by hand from the distilled documents.
Definitely a rocky road so far.
If you use Cursor for personal projects, I recommend reviewing each change very, very carefully.
It seems that cursor-thinking will come up with 3 options and pick the dumbest one. Leading to much worse performance than non-thinking sometimes.
A big part of it seems to be increased focus on following instructions vs 3.5. If you don't tell it to not cheat, it cheats lol. Sometimes it's even aware of this, saying things like "I should be careful to not delete this" but deleting it is the fastest path to solving the question as asked, so it deletes.
And neither has a drunken meth addict on an oz of shrooms and ketamine while snorting low-grade fentanyl.
Because I care about my craft.
> Any tips on fixing those?
Understand that no matter how fancy the guess-the-next-token machine is, it will NEVER replace the hard graft of logically deducing how a change is going to percolate througout your codebase.
The programmer's motto should resemble the old Porshe one:
Logical reasoning: accept no substitute
When an engine can use my codebase to build up an internal logical structure of its cascading effects where potential changes to the code can be what-if'd as a kind of diff, then I will consider it to be worthy of evaluation.Until then, I feel like an NBA player seeing that their opponent has chosen to only dribble with their ass.
I don't think you folks realize that you're the ones hallucinating. Predicting the next token is never going to be anywhere near 100% successful, especially for interesting projects.
Seriously, folks. I mean, week after week we keep seeing this shit show up here and y'all're like "You got any tips how I can keep smoking meth but not lose my last three teeth?"
I basically have to branch, commit every time it makes any progress at all, and squash later. There are built-in checkpoints that basically do this.
I actually run this side-by-side with my preferred IDE, and GitHub Desktop (to visualize the diffs). So, prompt -> Claude makes a change -> I view the diff -> I make some edits -> Commit -> back to Cursor.
I can't imagine not using something like PodMan, I just haven't set it up, so haven't tried Cursor.
Yes, these models are merely approximations, but things aren't just blindly bad as it these comments make it seem.
Edit: Yes, Sonnet 3.7 is eager, but I'd have to assume is designed that way. Yes, sometimes Sonnet ignores my system prompt. Again, these things are merely approximations that map from tokens to tokens. They are not reasoning or intelligent.
Restarting the editor worked! Can also try restarting the computer.
Too many of these tools seem to either give no diff, or make absolutely massive edits.