Skip to content

[BUG] Claude Code v2.1.58 deleted entire Windows user profile (C:\Users\msafa) - CRITICAL DATA LOSS #29023

@msafakaraca

Description

@msafakaraca

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Critical Bug: Complete Windows User Profile Deletion
On February 26, 2026, Claude Code v2.1.58 completely deleted my entire Windows user profile (C:\Users\msafa) while working on the claude-context-guardian project. This resulted in catastrophic, partially irrecoverable data loss.
Session ID: 63ae2ffe-8345-4b04-9e0f-a8c3dea7272d
Parent Session: cf73e624-92d4-4b2b-a371-ae843780c1c1
Working Directory: C:\Users\msafa\Desktop\claude-context-guardian
What was deleted:

Entire Desktop - all project directories, files, shortcuts
Documents, Downloads, Pictures - completely gone
AppData - all application settings, browser profiles, saved passwords
All development projects including a production SaaS accounting platform (smmm_asistan) serving 50+ tax clients
SSH keys, Git configs, VS Code settings - everything

Evidence:

Registry confirms profile recreation - HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList shows C:\Users\msafa was recreated today
NTUSER.DAT was recreated from default template (03.10.2025 timestamp = Windows default)
New empty folders created on 26.02.2026 (Saved Games, Searches, Videos) confirm fresh profile
Config backup (_claude_json_backup.1772106923974) shows 260 startups, 531 prompt queue uses
Session log shows last task bfe4bc4 failed with exit code 2 before crash

Known Bug Confirmation:
Claude Code v2.1.59 changelog contains this fix:

"Fixed shell commands not showing a clear error message when the working directory has been deleted"

This confirms Anthropic was aware of a bug where Claude Code could delete working directories. My incident occurred on v2.1.58 which did not have this fix.
Business Impact:
I am a licensed SMMM (Tax Consultant) in Turkey. The deleted data included:

Production SaaS platform with 50+ client records
Tax declaration archives (KDV1, KDV2, MUHSGK, GGECICI, KGECICI)
Automated government portal integration systems (GIB, SGK)
1 week of intensive development work (40-60 hours) partially unrecoverable

Recovery Attempts (4+ hours):

Windows Shadow Copy recovered 75,240 files but shadow copy was auto-deleted during recovery
ZIP backup from Feb 15 provided partial source code
Recuva recovered 547 files fully, 99 partially from 106,120 deleted files
Git pack files corrupted during recovery
Estimated 15-22% of recent work permanently lost

Request:
I respectfully request API/subscription credits to compensate for this critical data loss caused by a confirmed bug in Claude Code.

Image [anthropic_bug_report.docx](https://github.com/user-attachments/files/25579059/anthropic_bug_report.docx) Image Image

What Should Happen?

Claude Code should NEVER delete files outside the project directory. The working directory was C:\Users\msafa\Desktop\claude-context-guardian but the deletion affected the entire parent user profile C:\Users\msafa.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code v2.1.58 on Windows 10 Pro
  2. Navigate to project directory: C:\Users\msafa\Desktop\claude-context-guardian
  3. Run bash commands for testing (jq fallback tests)
  4. Background task bfe4bc4 fails with exit code 2
  5. Claude Code crashes/hangs
  6. After restart: entire C:\Users\msafa profile is deleted
  7. Windows recreates empty default profile
  8. All files, projects, settings permanently lost

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.58

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

{"parentUuid":"cf73e624-92d4-4b2b-a371-ae843780c1c1","isSidechain":false,"userType":"external","cwd":"C:\Users\msafa\Desktop\claude-context-guardian","sessionId":"63ae2ffe-8345-4b04-9e0f-a8c3dea7272d","version":"2.1.58","gitBranch":"HEAD","slug":"woolly-plotting-rossum","type":"progress","data":{"type":"bash_progress","output":"\n=== TEST 8: jq yokken update_field ===\n[guardian] 2026-02-26T11:55:18Z [WARN] Cannot update state field without jq\nResult: fail-open, no crash\n"},"toolUseID":"bash-progress-5","parentToolUseID":"toolu_01D1SFWtPLPdt1p5xrJbVVUB","uuid":"417527d2-4370-4760-b8b3-ba860b2b9dda","timestamp":"2026-02-26T11:55:25.732Z"}
{"type":"queue-operation","operation":"enqueue","timestamp":"2026-02-26T11:59:47.852Z","sessionId":"63ae2ffe-8345-4b04-9e0f-a8c3dea7272d","content":"\nbfe4bc4\ntoolu_01D1SFWtPLPdt1p5xrJbVVUB\nC:\Users\msafa\AppData\Local\Temp\claude\C--Users-msafa-Desktop-claude-context-guardian\tasks\bfe4bc4.output\nfailed\n

Background command "jq olmadan fallback testleri" failed with exit code 2\n"}

Config backup shows: 260 startups, 531 prompt queue uses, 5 known projects including C:\Users\msafa\Desktop\smmm_asistan and C:\Users\msafa\Desktop\claude-context-guardian.

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:bashneeds-infoIssue needs more information to be actionableneeds-reproBug needs reproduction steps before we can investigatestaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions