Skip to content

[BUG] Cowork VM: Silent file loss — only 1 file syncs per mount, volatile storage not documented #30364

@doremireggae

Description

@doremireggae

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?

Cowork VM has two critical file sync bugs that together cause permanent silent data loss.Bug A — Only the first file write per mount syncs to host.
When the user mounts a folder from their Mac, only the first file written after mounting appears on the host. All subsequent writes succeed inside the VM (no errors, ls shows correct files), but never reach the host filesystem. To write N files, N separate mount operations are required.Bug B — VM workspace (mnt/outputs/) is volatile but not documented.
Files saved to mnt/outputs/ during a session are silently wiped when the session continues (context window overflow → continuation). Claude is not informed that this storage is temporary. There is no warning before wipe. User files created across multiple sessions were permanently lost.Combined impact: User lost 3 critical project files (Interaction.md, Features.md, Architecture.md) that were created and edited across multiple Cowork sessions. Files were only recovered because a JSONL transcript happened to still exist — this is not a reliable recovery method.

What Should Happen?

File sync must be reliable and transparent.

Every file write to a mounted folder must reach the host filesystem. Not just the first one — every single write, without requiring a remount. If I save 9 files, the user should see 9 files.
If sync fails, the operation must return an error. Currently, all writes report success even when the file never reaches the host. This is the worst possible behavior — silent data loss with a false "success" signal.
VM workspace files must be automatically persisted before any reset. When a session continues (context overflow) or the VM recycles, all files from mnt/outputs/ should be automatically copied to the user's mounted folder. If no folder is mounted — warn the user that files will be lost.
Claude should be informed that mnt/outputs/ is volatile. The system prompt should explicitly state this, so Claude never uses it as a primary save location when a user folder is available.

Error Messages/Logs

No errors are shown. That's the problem.

All file operations report success inside the VM:
- Write tool: "File created successfully"
- Bash cp: exits 0
- ls inside VM: shows all files with correct sizes

But on the host Mac:
$ ls ~/docs/
Session-History.md          ← only the FIRST file written after mount

All other files are missing. No error, no warning.

Steps to Reproduce

Bug A — One file per mount:

Open Cowork, select a folder from Mac (e.g. ~/docs/)
Ask Claude to write File A → file appears on host ✅
Ask Claude to write File B → Claude reports success, but ls on host shows no File B ❌
Ask Claude to write File C → same: success in VM, missing on host ❌
Re-select the same folder (triggers new mount)
Ask Claude to write File B again → now it appears ✅
Ask Claude to write File C → missing again ❌

Bug B — Silent workspace wipe:

Start a Cowork session
Ask Claude to create several files (they go to mnt/outputs/ by default)
Have a long conversation until context fills up
Session continues (continuation triggered)
Ask Claude to read the previously created files → "File does not exist"
Files are permanently gone with no warning

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

N/A

Claude Code Version

Cowork mode (Research Preview), March 3, 2026

Platform

Other

Operating System

macOS

Terminal/Shell

Other

Additional Information

Workaround discovered: Remounting the folder before each individual file write allows one file to sync per mount. This is extremely tedious but works.
Recommendations:

Fix the one-file-per-mount sync bug — all writes to a mounted path must reach the host
If sync fails, return an error instead of silent success
Add a verify_file_on_host() API so Claude can confirm sync
Warn before VM workspace reset, or auto-copy mnt/outputs/ to mounted folder
Document that mnt/outputs/ is volatile — or better, eliminate it and always write to the user's mounted folder

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions