r/ClaudeCode • • 22h ago

Help/Question Claude code keeps undoing its own fixes. What are you switching to?

Seeing all the talk about Claude sabotaging coding sessions lately.

The frustrating part is when it fixes one thing, breaks another, then starts patching its own patches.

I'm considering trying other models. What are you actually switching to, and is it better in real coding sessions?

0 Upvotes

32 comments sorted by

•

u/AutoModerator 22h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

15

u/drizzkek 22h ago

I think what you lack is a process. When you have issues, work with Claude to implement processes that are enforced by hooks and guards. Like making sure there are always tests built and ran as a regression test suite anytime you make changes. Going to a new model isn’t going to magically make this any better as your codebase grows.

2

u/LadySmith_TR 21h ago

I just wrote hard rules about some stuff, it cannot change anything it wants. Needs more babysitting but never seen a regression due to undoing some of the stuff it fixed. Better than nothin.

4

u/BoboThePirate 22h ago

You misunderstand. Most of the sabotage for AI training or advanced llm kernel development (even this one is mostly not a thing anymore).

In my experience so far, Claude is still king of development currently. OpenAI frontier is a shit show currently, Sol is still decent. I’ve also heard great things about Neon but I haven’t used it yet.

7

u/i-hate-space 21h ago

You are the issue dude

4

u/that1cooldude 20h ago

Sounds like a user lack of skill issue. 

2

u/Patient-Ad6019 21h ago

Dont know if it will help, just guessing here in general.

Maybe you dont have a clear outline of what you are building and where its going? I like to make a Product. md or System Design with some decisions and high level guidelines to keep track.

If the issue is in more of a low level coding, then maybe try to make some proccess that allows it to validate the app like a real user not just unit testing.

2

u/called9527 21h ago

the patching its own patches thing is usually a sign the session is cooked, not the model. once theres 3 failed attempts in context it keeps building on them. reset to the last working state, new session, one line on what the bug is and what already didnt work. id try that before switching tools

2

u/Gigaslavx 21h ago

You on Pro using Haiku without knowing what's going on or something I mean at least include the model and an example without spoiling your "industry secrets" :p

3

u/Geekfest 22h ago

Seems to be the consensus right now. Claude's been good for a while, but Anthropic has been fucking around with something lately.

Based on some other threads, a lot of folks seem to be going with either Gemini (Neon) or QwenCloud.

At various points I've literally been on the 'Subscribe' page for each. Gemini was frustrating because there was a Black Friday sale that they botched. QwenCloud was frustrating because their billing page kept throwing an error. (Not inspiring confidence with either choice there, honestly)

3

u/Far_Reindeer8428 22h ago

switching won't fix it, the loop is the problem. one fix per session with the failing test pinned beats a stronger model

1

u/smb3something 22h ago

Yeah, this is what I run into when I don't plan the structure of things in advance or well enough. I got to a point in a project where every thing I tried to add went back and forth for ages. Turns out my design had shifted from the principals and it was struggling to adhere to all the instructions and keep things in line. Once I properly planned out my permissions structure in my application, the problems went away.

1

u/hieuphung97 21h ago

Switching models rarely stops the thrashing. Once the context window fills with failed diffs and stack traces, every model tries to reconcile contradictory code. The only reliable move is rolling back to main and giving it one isolated test case.

1

u/TenerifeInFoCo 21h ago

It is hard to know what to switch. I used deepinfra api models, deepseek in particular, Claude, codex, and Gemini, and they all have problems. I’m not sure what may be better or worst.

1

u/CorpT 21h ago

Weirdly, whatever you switch to is going to have the same problem. I think you’re just unlucky.

1

u/Late-Replacement-481 21h ago

Code comments, planning? Some sort of organized process? Pull requests? Documentation?

1

u/Starks1293 21h ago

switching wont fix that one, codex does it too. what stopped it for me:

  • when it fixes something, it writes one line in a notes file the next session reads: what broke, why, and "dont undo this". most of the undoing is a fresh context that doesnt know the fix was on purpose
  • a regression test for every fix before moving on, so undoing it fails loudly
  • one fix per session. once the context is full of failed attempts it starts patching its patches like u said. new session, point it at the notes

disclosure, the notes part is what my mac app automates (AI Bridge), a nightly pass reads the sessions and proposes those lines for u to approve. but a plain NOTES.md plus a rule in CLAUDE.md to keep it updated gets u most of the way. aibridge.sh

1

u/handjobs_for_crack 21h ago

GLM 5.3 is just as good as is much cheaper.

1

u/pwkye 21h ago

you dont use issues, branches, MRs, CICD regression tests?

and thats claudes fault?

1

u/Astronaut6735 20h ago

I haven't run into this, but I'm only on Pro ($20/month) and I /plan everything before I let Claude change anything. I review the plan, and alter it if it's going to do something wrong. I also make small isolated changes one-at-a-time rather than big ones, and I start a new session after each change. I'm not sure switching to another model would help.

1

u/bitspace 20h ago

Always review with a different model family from the implementer.

1

u/Hurley002 20h ago

I'm not a doomer or conspiracy theorist and I don't have any great suggestions for you, unfortunately, but I kind of can't help but wonder how much of this is actually attributable to recursive self improvement.

1

u/SidYaj08 20h ago

As a part of the CFD code I am writing, I had Claude build unit tests for any new feature I have it implement. It also runs a suite of simulations to ensure the results are bitwise identical after a change. A good process and workflow is essential when building a tool using AI

1

u/Remarkable-Depth-904 18h ago

Claude couldn't access basic Rss feed on a page i needed.

ChatGPT never had an issuse and basically coded my whole thing alone.

Thats when I realised.

1

u/Top_Reward7713 17h ago

resetting the session helps, but I've had better results with o3-mini for code, less patching, more stable fixes. tried it after Claude kept undoing my guards.

0

u/whatisusb 20h ago

Its all bots. All these sabotage posts are just bots

0

u/MrJacquers 20h ago

I've switched to Codex.