claude-code - 💡(How to fix) Fix [BUG] Cowork: "Delete Cowork VM Sessions and Restart" zeroes data blocks and destroys all sessions, plugins, skills, and scheduled tasks [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47497Fetched 2026-04-14 05:48:16
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1cross-referenced ×1

Error Message

Error Messages/Logs

No error messages. The app simply restarts with a blank state. No pre-deletion warning about the scope of data loss.

Root Cause

Recovery investigation results: After triggering this deletion, a thorough recovery attempt was conducted:

  • winfr /extensive recovered 53,347 files from the drive — all 113 JSONL session files found were null-filled (zeroed)
  • Volume Shadow Copy / System Restore was not available
  • The only surviving session data was found in the Electron browser cache (a different directory not touched by the deletion), yielding partial fragments of 4 out of ~20+ sessions
  • A cowork-service.log in LocalCache\Roaming\Claude\logs\ survived because it is in a separate directory, but only covered one session's data due to log rotation

Code Example

No error messages. The app simply restarts with a blank state. No pre-deletion warning about the scope of data loss.

Post-deletion filesystem state:
- %APPDATA%\Claude\local-agent-mode-sessions\ contained only newly created session directories
- All previous session .jsonl files were deleted with their data blocks zeroed
- winfr /extensive recovery of 53,347 files: all 113 recovered JSONL files were null-filled
- Plugins, skills, and scheduled tasks directories were empty
RAW_BUFFERClick to expand / collapse

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?

Clicking "Delete Cowork VM Sessions and Restart" in the Claude desktop app permanently destroys all Cowork data. The scope of deletion far exceeds what the button name implies and what the documented behaviour should be.

What the name suggests (and what the documented behaviour is): Deleting the VM's internal state only — temporary files, cached data within the VM. According to documentation, and consistent with prior experience using this button without data loss, session transcripts, plugins, skills, and other user data stored on the host filesystem should be preserved.

What actually happened: Permanent, irrecoverable destruction of:

  • All session transcripts (JSONL conversation histories)
  • All installed plugins
  • All custom skills
  • All scheduled tasks
  • All project metadata and configuration
  • Global instructions (CLAUDE.md)

Critically, the deletion operation zeroes the data blocks on disk before removing the files. This means standard file recovery tools (Windows File Recovery / winfr, Recuva, R-Studio, etc.) cannot recover the data. The files are not simply deleted from the filesystem — their contents are overwritten with null bytes first, then the file entries are removed.

Recovery investigation results: After triggering this deletion, a thorough recovery attempt was conducted:

  • winfr /extensive recovered 53,347 files from the drive — all 113 JSONL session files found were null-filled (zeroed)
  • Volume Shadow Copy / System Restore was not available
  • The only surviving session data was found in the Electron browser cache (a different directory not touched by the deletion), yielding partial fragments of 4 out of ~20+ sessions
  • A cowork-service.log in LocalCache\Roaming\Claude\logs\ survived because it is in a separate directory, but only covered one session's data due to log rotation

What Should Happen?

The button should only delete VM-internal temporary state, as documented and as it has done previously. Session transcripts, plugins, skills, scheduled tasks, and global instructions should be preserved on the host filesystem.

If the scope of deletion has intentionally changed:

  1. The button should have a clear, explicit confirmation dialog stating exactly what will be destroyed.
  2. The deletion should not zero data blocks — normal file deletion would at least allow recovery tools to work as a safety net.
  3. The app should offer an export/backup option before performing destructive operations.
  4. The button name should accurately communicate the full scope of what is deleted.

Error Messages/Logs

No error messages. The app simply restarts with a blank state. No pre-deletion warning about the scope of data loss.

Post-deletion filesystem state:
- %APPDATA%\Claude\local-agent-mode-sessions\ contained only newly created session directories
- All previous session .jsonl files were deleted with their data blocks zeroed
- winfr /extensive recovery of 53,347 files: all 113 recovered JSONL files were null-filled
- Plugins, skills, and scheduled tasks directories were empty

Steps to Reproduce

  1. Use Cowork mode over multiple sessions, accumulating conversation history, plugins, skills, and scheduled tasks
  2. Navigate to the app settings
  3. Click "Delete Cowork VM Sessions and Restart"
  4. Observe: app restarts, all previous data is gone — sessions, plugins, skills, scheduled tasks, global instructions
  5. Check %APPDATA%\Claude\local-agent-mode-sessions\ — all previous session directories have been deleted
  6. Attempt file recovery with winfr — recovered JSONL files are null-filled (zeroed on disk before deletion)

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude for Windows Version 1.1617.0 (8d6345)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Related issues:

  • #38055 — Cowork: Minor version update permanently deletes chat history and scheduled tasks (different trigger: auto-update vs explicit button click, but same devastating outcome)
  • #45076 — Cowork session history, conversation logs, and project metadata silently lost between sessions (closed as duplicate)

Key distinction from #38055: That issue describes data loss triggered by version updates (unintentional). This issue describes data loss triggered by an explicit UI action whose scope and permanence contradict the documented behaviour. The button previously worked correctly (deleting only VM-internal state). Something changed to make it delete host-side session data as well. The data zeroing behaviour (making recovery impossible) is an additional concern.

Severity: This is a data-loss bug with no recovery path. The combination of a misleading button name, no confirmation dialog, behaviour contradicting documentation and prior experience, and aggressive data zeroing (preventing even disk-level recovery) makes this particularly harmful. Weeks of session history, custom skills, and plugins were permanently lost.

extent analysis

TL;DR

The "Delete Cowork VM Sessions and Restart" button's functionality should be revised to only delete VM-internal temporary state, and an explicit confirmation dialog should be added to prevent unintentional data loss.

Guidance

  • Review the code changes made between the last working version and the current version (1.1617.0) to identify what caused the button's behavior to change.
  • Implement an explicit confirmation dialog before performing the deletion, clearly stating what data will be destroyed.
  • Modify the deletion process to only remove files without zeroing their contents, allowing for potential recovery.
  • Consider adding an export/backup option before performing destructive operations.

Example

No code snippet is provided as the issue does not include specific code references.

Notes

The issue's severity is high due to the permanent and irrecoverable nature of the data loss. The fact that the button's behavior has changed from its previous, documented functionality makes it a regression bug.

Recommendation

Apply a workaround by avoiding the use of the "Delete Cowork VM Sessions and Restart" button until the issue is resolved, and consider exporting or backing up important data regularly to prevent losses in case of similar issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Cowork: "Delete Cowork VM Sessions and Restart" zeroes data blocks and destroys all sessions, plugins, skills, and scheduled tasks [1 comments, 2 participants]