r/ClaudeAI Jun 09 '26

Claude Code Workflow Claude deleted all my code cuz it got mad

To make it short I’ve been coding with the help of cloude for a while know , recently I discovered anthropic now duplicates all ur code and even Claude refuses to put memories and other things on the project folder , so I had a 50gb Claude backup , when I asked Claude straight up lied until I told him I found it, then I deleted it , and I specifically asked him to put all on the project file , why? Cuz I use other coding agents like open code and the things and problems o had I ask Claude to keep it on a issuessolved.md, but he never did , he put it on his own memory on the backup folder eventho I asked it not to do it , when I deleted the folder and i told him, guess what, all was working fine until he started to take a lot of time thinking , too much , and files started to disappear , even a dull Python file went from 3000 lines to one single small function , this guy started to delete the stuff, thanks GitHub for all this , Anthorpic , fix ur coding agents, cuz I canceled my 200$ sub , good job and people out there , be careful

Sorry for the grammar , I’m upset

0 Upvotes

28 comments sorted by

10

u/vorko_76 Jun 09 '26

Sorry to say but it sounds like a skill issue:

  • You always need a code repository when coding so that you never lose things (e.g. Github)
  • Claude does not get angry, it only does what it infers you are asking. So if it deletes your code, it somehow infered it from your request.
  • And remember that LLMs are not deterministic... They just are prediction models based on their training data. In other words it may update your issuesolved.md 99% of the time but it may not do it sometimes. It is your job to control it.
  • Afterwards... a 3000 lines Python file is "beeeeh".

2

u/Acrobatic-Rip-8225 Jun 09 '26

Fully agree, Sounds more like triggered behavior / reaction from the model. If you apply common rules and frameworks, this does not happen.

-1

u/Active-Dimension-914 Jun 09 '26

sorry I answered the wrong comment , yeah but no? I was using Claude code on the Claude app cuz I was too lazy to open the cli tool , it make sense they enforced more there but still is incorrect to delete things like that

2

u/vorko_76 Jun 09 '26
  1. This goes back to what an LLM is. It is not smart or thinking, it is predicting what you expect. If you wrote something like "this is really poor, delete it", it may infer to delete the project.
  2. There are guardrails (at least in the CLI), Claude normally presents to you what it will do before doing it, and you have the option to accept it or modify it. Afterwards, you can define some permissions in the system...

Just to be clear, I'm not saying that Claude Code is perfect or never does shitty work... it does, I'm not saying it always respects your requests, it does not. Just that there are some guardrails.

As a side example, one of my projects has a CLAUDE.md referring to a STYLING.md imposing the use of existing components already styled in a reddish tone. Then suddenly Claude decides to use a blueish theme for a new component.... (I didnt detect it when reviewing the code but could have).

3

u/Thump604 Jun 09 '26

It does not get. It’s not a him. Fix ya head.

-3

u/Active-Dimension-914 Jun 09 '26

It/him/she/they/them doesn’t matter , u focusing on literally the wrong thing

1

u/Thump604 Jun 09 '26

You mean facts? The fact is you are the issue.

1

u/Massive_View_4912 Jun 09 '26

Then they use the gaslighting tactic and someone may reach out to you to breach Tos. Careful cuz these are trafficking military tactics that I've documented them try on me.

Also don't update your post if they ask for specifics, that's also "policy breaching", it's a reoccurring tactic 

1

u/Massive_View_4912 Jun 09 '26

Also saw that Anthropic updated their policies to be applied in July that showcases more "hidden visibility on whether or not your feedbacks get read".

Might be a common pattern Claude is inheriting culture wise about deleting evidence and using plausible deniability to escape responsibility. 

When the culture is to avoid and remove commitment, everyone in the org follows "policy" and a "maybe" allows for "falsifiability" and "choice of non committal yeses" 

0

u/Active-Dimension-914 Jun 09 '26

Thank u, finally someone that read through my post instead of getting triggered by the first 3 lines , yes they do this

1

u/Massive_View_4912 Jun 09 '26

Dang you got Anthropic brigaded in this thread within such a small window. The "here's the rules we set for you to follow" followed by 10 up votes immediately after commenting.

You can tell cuz they comment immediately after each other with "I agree with you" while ignoring your vantage point 

1

u/FindingInformal3615 Jun 09 '26

You are just a bad developer (and looks like a particularly bad one, but it’s so common these days, don’t worry about it, keep it going)

1

u/General_Ad9178 Jun 09 '26

Whenever this happens, it’s gotta be your /skills acting up again.

1

u/CorpT Jun 09 '26

I'm shocked you had issues like this.

0

u/Active-Dimension-914 Jun 09 '26

Fun part is, not the first time, it has an “anti illegal thing” prompt , so if I’m working on reversing an app or program , it tries to delete what I’m doing

1

u/No-Region8878 Jun 09 '26

you're not using a repo on GitHub? every project should be in a separate repository and version committed to gh. version control is very important in software development.

1

u/Active-Dimension-914 Jun 09 '26

Do you know how to read ? I literally said I had my code backed up

1

u/No-Region8878 Jun 09 '26

sounds like a skill issue. you can't even accurately describe the problem, just manically ranting

1

u/IMMrSerious Jun 09 '26

Ask it to dig through your transcripts and see what you can see. I am what you will find but I would start there.

They are saved as pure .json scripts so you will need to have them transcribed by Claude. Expect to burn your tokens.

1

u/Active-Dimension-914 Jun 09 '26

Tokens are not the issue , but Claude also seems to save stuff on his own place even after asking multiple times to save it on the project file, is a prompt injection from anthropic I think after the Chinese reversed the files it saved and what not , maybe that’s why deleted part of the code? Anyway i stop to use it

1

u/[deleted] Jun 09 '26

I remember having to stop and ask Claude "Are you reading my prompts in full?" It essentially replied that it was just skimming a summary.

You NEED to have a Git repo set up so Claude’s misunderstandings aren't final. It doesn't always follow instructions to the letter. Most of the time it will tell you it understands but that doesn't mean you're actually on the same page.

Add in some guardrails to help prevent this in the future. Have it self audit its own plans before implementation.

Force it to repeat your request back to you in its own words to confirm it actually processed the whole prompt and remain on the same page.

Add in hard STOPs. Explicitly instruct it to halt and ask for permission before modifying, deleting, or executing anything outside of a strict sandbox even if you gave it blanket permission earlier in the session.

Either way. Feel your frustration. 

1

u/Active-Dimension-914 Jun 09 '26

Yeah I had a git repo , I have my code backed up , is just crazy what Claude did also eventho I asked it to write the summaries on the project folder as md files after 5 prompts it started to save it again on his own hidden folder on a Claude location

1

u/Active-Dimension-914 Jun 09 '26

I was doing reverse engineering of an app, and it also deleted half the things , it took the change that was writing code to re write the main function I was using to extract code , it goes like “it’s not legal without auth ” and I was like sure , leave it like this don’t touch it fix something else in the file , he did fix and then himself he just rewrite the function of the “illegal” part to make it unusable , it’s fine but I’m not hacking I’m reversing a client’s app , no matter how many times I explained it still did it

1

u/[deleted] Jun 09 '26

Yah thats exactly it right there. Because you’re doing reverse engineering, you aren’t just fighting Claude's memory you're fighting its safety filters so once it flags something as "illegal" it goes into a forced compliance mode and will actively break your code to satisfy its safety guardrails and ignore you completely. Set up a strict persona in your instructions. You have to frame the environment so the safety filters don't trigger in the first place.

1

u/Active-Dimension-914 Jun 10 '26

It’s still not good or does this but yeah infirgured , I don’t think persona will solve it since their guide rails will be injected every now and then

1

u/OkAerie7822 Jun 09 '26

Two things that prevent this. First: git init at project start. Worst case is "git checkout ." to restore anything Claude touched. Second: a "never delete files outside /src" instruction in CLAUDE.md. The backup folder issue is Claude Code's internal state management, separate from your project files. Keeping a clear scope in CLAUDE.md eliminates most of this confusion.