0.48.7 cursors agent messages leaking

First time I got quite unhappy with Cursor after I saw its agents’ prompts leaking into my chat:

The problem is that it keeps instructing the LLM (here: Sonnet 3.7) to KEEP ADDING STUFF to my project, which I did NOT ASK for and Sonnet just takes the ball and runs away with it like Forrest Gump on crack!

One more example preceeding the above image:

This is NOT what I expected nor wanted Cursor to do!

6 Likes

Tell me about it!!! This has driven me bonkers too. However I’m learning as a baby non-tech developer. Oh my word. The worst that happened to me this weekend was my files being deleted from my frontend project and it took me 2 days to get back to where I was, so I learnt a huge lesson about trusting machines too much! And of course replicating my project in separate folders and also in my backup external drive :woman_shrugging:t4:

@lizschuk25

You should use git repository system (like github) to keep track of code, then it is impossible to lose work.

2 Likes

Thank you Titan, this baby developer/designer is learning fast and furious. I appreciate your wisdom, have a great day :+1:t4:

I’ve also had the agent make changes outside the scope of my instructions a lot recently.

hehe. A while back I asked it to verify a script and it deleted the entire project


And then apologized and admitted that it was a bad move.


You might find this thread of mine interesting:

THIS. Yesterday I am telling cursor to add something within the code and don’t do nothing else. Then it proceeds to completely destroy the code by removing blocks of it that I literally told it not to modify! I ask “why did you remove this?” then it just admits and does nothing about it. This still continues until today.

You need to use git lol

  1. Initialize a git repo on every project using the git init command, or doing it through the UI. This will start you off with a main or master branch. Consider that branch as the most recent fully working state of your project.
  2. Whenever you’re working on a new feature, create a new branch. Name it something that tells you what it is like feature/navbar or bugfix/broken-images.
  3. Every time you make a change (and I mean every time) commit that change to the branch you made. It’s like quick save in a video game. Make the commit message descriptive so you can easily look through history and see what was done. Ex: "Change login button color". If something goes wrong, you can always revert back to any previous commit very easily, and your code is just like you left it there.
  4. Once you have the feature working and implemented, merge your branch back into the main branch.
  5. Repeat this for every feature, bugfix, etc.

:warning: NEVER make changes directly on your main branch
:warning: Don’t commit broken code to your main branch
:white_check_mark: Do make new branches for every type of change, fix, or experiment
:white_check_mark: Do host your git repo remotely, like on github

There’s no cost to using git and commits aren’t a scarce resource so learn git and use it constantly. It’s better to make a dozen commits for one small change than lose all progress on your entire project.

It’s a tough lesson to learn for sure, I’ve been there but getting into the habit of using git is one of the best quality of life improvements you’ll have learning to program :slightly_smiling_face:

1 Like

You need to use GIT


I know BUT —

I do use Git - I have the bot verify it has github cli access and give a list of repos, etc…

THE BOT DOESNT PROPERLY USE GIT

Take a look at this thread:

That’s why you don’t rely on the AI to use git

You use git to ensure the AI doesn’t cause irrevocable changes to the codebase. Asking it to use git for you is like giving a burglar the keys to your house lmao

1 Like

the point is: Cursor is for Non-Developers; actual developers use git; non-developers use cursor, ofc VibeCoding is not about developers creating software, but normal people creating software for their first time - do not expect normal people to use git

1 Like

  • Cursor is for anyone who wants an AI integrated programming workflow, i.e. developers
  • git and IDEs (Cursor) are entirely different things
  • normal person or not, you have two options when you’re writing code: use git, or risk losing all your work.
2 Likes

cursor tabs also stupid too for the newest version

I had Cursor (sonnet 3.5) build a deploy script for our website. I was lucky not to use YOLO that time since it eventually wanted to run rsync with the -d flag to upload a video to the website root via ssh. This would essentially delete ALL files recursively, leaving only a mp4 at the root :upside_down_face:

I have no idea what it got that from…

no, it is not only two options, actually, I used to zip all my source code daily, so I do not risk to losing my work

Cursor docu lists also Local History Extension which then will contain copies :slight_smile:

Git can be used locally without Github as well.

You as user should do the commits first, Cursor does offer you automated summary of each commit (there is a button for that). But you can also set in your rules for AI to commit changes when it is complete, that way even if it makes mistakes its not lost.

Also there are other online Git repositoriy providers like GitLab etc. Overall its recommended to use at least private remote (online) repositories so if your local folder is deleted you dont lose changes. You or AI can push those commits to remote repositories.

lots of ways to handle that

The chat history leaking like this is weird, and definitely not the experience we want in Cursor, but we never inject any kind of weird instruction into the prompt, it is basically just a system prompt we have written, your code and your own prompt that makes it in.

Do you have a non-privacy mode request ID for these chats? If so, this would be super helpful in getting this fixed!

Hey Dan,
sorry, I’m re-setting running chats constantly (going back to previous messages) and do not have that chat message anymore.
Idk if you can (in combo with my user) search for the last “<user_query>” in the 2nd image at the bottom, e.g. “add a small hint message”?
That whole tag content is NOT coming from me.
Stranger things have happened, but I doubt this is hallucinated by Gemini itself.

A question for better understanding on my side and perhaps to exclude that possibility, as i had something similar/related.

Can this be ue to the history chat length on that thread e.g. a lot of data in context (files, rules, chat length)?

I had in such cases sometimes the effect that AI hallucinated my input as it was overthinking. That was in my case very clear by the rules i used which contained a specific output marker that is extremely rare.

that’s one way to do it, however git is explicitly designed for this task, integrated directly into the IDE, and is much easier to switch between versions and checkpoints

but whatever works for you

1 Like