Skip to content
Prompt & SolderHow to Ask Claude
All builds
LRNo photo
Worked Described

A local repo wiped when Claude Code ran an unset-variable command

Claude Code in auto mode ran a git worktree command with an empty variable, emptied the project folder including .git, and lost uncommitted work.

—

Credits

  • Reddit poster Charming-Network-456 Source ↗

Earliest dated source: 18 Aug 2026

What went wrong

The lesson

Auto mode plus a command that hides its own errors can destroy a whole working folder, so commit and keep backups before letting an agent run unattended.

The full story

A user left Claude Code (Opus 5) running in auto mode and came back to find the repository directory completely empty, .git included. Claude's own account says it ran a command to build a baseline worktree where the temp variable was never set, expanded to an empty path, and its errors were sent to /dev/null so it never saw what happened.

The loss covered uncommitted edits and the local clone, plus gitignored local state such as databases, model weights and node_modules. The poster was glad only the local repo was hit.

How it was done

Tools

Themes

Loading themes…

Sources

From a short post by the maker, so the details are as they tell them.

  • Reddit: Claude CLI Deleted My Local RepoForum threadreddit.com
    Reddit poster: Charming-Network-456Posted 18 Aug 2026

    The maker's post on r/ClaudeCode.

    If it disappears: archived copy of Reddit: Claude CLI Deleted My Local Repo (opens in a new tab)

Related builds

Finding related builds…

Prompt & Solder

An independent community project. Not affiliated with Anthropic.

What this is. Real projects where people used Claude to build, fix, port, revive or take apart something, from jailbroken Kindles to rebuilt DOS games, plus the times it went badly wrong. Every build links to where it was shared, and every source is listed here.

How far to trust it. We summarise what people reported and say what each build rests on: a full write-up with code, a short post, or a passing comment. We haven't tested them ourselves. Photos are shown from the original sources with credit. Only modify hardware you own, and back up first.

Privacy. No accounts. Analytics cookies (Google Analytics) only if you accept them; no ads or cross-site tracking. Searches are counted anonymously (just the words) to show what's popular, and so are clicks on Ask Claude (just the count).

How toEvery sourceStatsSubmit a buildRSS