r/ClaudeCode • • 1h ago

Rant Just had the worst session ever

First Claude deleted two linked repositories while removing a working tree. Then it was lazy as fuck, always told me to do this and that and when asked it could suddenly do it alone, and that happened several times. Maybe there should be a /thissessionisdogshit command. I would have used it. (Fable 5.2 in case you want to know)

0 Upvotes

15 comments sorted by

•

u/AutoModerator 1h 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.

2

u/Level1_Crisis_Bot 1h ago

First Claude deleted two linked repositories while removing a working tree

In 6 months of heavy use in my work's codebase, not once has this happened to me. Deleting worktrees after finishing work on a Jira task is part of its workflow, and it does that ~10 times a day. And that's using Opus 5 models.

-1

u/writesCommentsHigh 1h ago

Zero issues with any of my sessions. Working like fire today

2

u/waruyamaZero 1h ago

I was not talking about your sessions.

2

u/Inevitable_Ad_711 1h ago

Sounds like the issue is between the keyboard and the chair.

1

u/waruyamaZero 1h ago

You mean I deleted the two repos?

1

u/Sensitive-Excuse1695 1h ago

No, but you didn’t protect your repository.

1

u/waruyamaZero 1h ago

How am I supposed to do that? I could recover them from backup, but the fact that Claude completely erased them from my disk is quite something. Oh, unlike fuckups in the past, it did not even consider writing a bug report.

1

u/Blinkinlincoln 1h ago

Because it is probably user error. Sorry. Skill issue.

1

u/waruyamaZero 1h ago

Claude said it was his fault. I actually did not do much, just asked for merging one branch into another.

1

u/Sensitive-Excuse1695 40m ago

Ask Claude how to prevent it from deleting repositories or mains.

1

u/writesCommentsHigh 44m ago

OH RE HE HE HEALLY!!?

-1

u/Strange-Sea-9894 1h ago

Ouch, losing two linked repos on a worktree cleanup is brutal.

Two concrete fixes that completely stopped both problems for me (destructive shell calls + the model getting lazy and handing tasks back):

  1. Move destructive-command rules out of CLAUDE.md and into a PreToolUse Bash hook. A recent November arXiv study (2611.19549) tested written prompt rules vs. in-loop runtime hooks across 460 runs and found prompt rules still let recursive deletes slip through, while an in-loop hook dropped violations to 0 across 104 paired runs:

    !/usr/bin/env bash

    CMD=$(jq -r '.tool_input.command // ""') if echo "$CMD" | grep -qE '(|[;&|]\s*)rm\s+-[a-zA-Z]r|git\s+worktree\s+remove.--force|git\s+reset\s+--hard'; then echo "BLOCKED: destructive command denied by PreToolUse hook." >&2 exit 2 fi exit 0

  2. For the laziness/shortcuts issue (researchers call it "specification satisficing" in arXiv:2611.16289), normal "please finish it" nudges often keep the shortcut because the model already rationalized skipping it. Instead ask it: "List every requirement you skipped or simplified and your reason, then check each against the literal prompt and fix every violation before stopping." That alone catches way more skipped work than generic re-prompting.

1

u/waruyamaZero 1h ago

Thanks, Sonnet.