Cowork/local agent mode: outputs shown as project files vanish after re-choosing the project folder — indistinguishable from data loss

Status Fixed / completed
Maintainer reply None cached
Activity 1 comment · opened Aug 26, 2026 · closed Aug 26, 2026

What happened

A Cowork (local agent mode) session generated a set of agent config .md files. In the app they appeared to be in my chosen project folder (Documents/Claude Code/Fixing Stuff, which lives in iCloud Drive with Optimize Mac Storage enabled). I renamed the folder in Finder, re-chose it in Claude to continue in forked sessions, and the folder then showed as empty. Undoing the rename restored the folder name but the files never reappeared in it. From the user's chair this was indistinguishable from Claude deleting the files, and it caused a serious panic.

What was actually going on

The generated files were never written to the chosen folder on disk. They lived in the session sandbox at:

~/Library/Application Support/Claude/local-agent-mode-sessions/<chat-id>/<session-id>/agent/local_ditto_<session-id>/outputs/

Re-choosing the project folder re-bound the session to the real (empty) directory and silently dropped the sandbox outputs from view. It took extensive filesystem forensics (session transcript archaeology, inode/crtime comparison across the rename/undo cycle, Spotlight queries) to establish where the files physically were and that nothing had been deleted.

Why this is a bug

  1. The UI presents sandbox outputs as if they are inside the user's chosen folder, but the folder on disk stays empty — checking in Finder directly contradicts what the app shows.
  2. Renaming the project folder and re-choosing it orphans the outputs view with no warning, no error, and no pointer to where the files physically live.
  3. There is no user-visible path from "my files disappeared" back to the local_ditto/outputs/ directory. Recovery required manual digging through ~/Library/Application Support.
  4. Interaction with iCloud Drive folders (Desktop & Documents sync, Optimize Mac Storage) makes diagnosis even harder, since sync eviction is a plausible red herring the user has to rule out.

Suggested fixes

  • Warn when a chosen project folder's path/identity changes mid-session instead of silently re-binding.
  • Surface the physical location of session outputs in the UI (or an "open outputs folder" affordance).
  • Or sync/mirror outputs into the chosen project folder so what the app shows matches the filesystem.

Environment

Claude Desktop on macOS (Darwin 24.6.0), Claude Code sessions 2.1.x, folder inside iCloud Drive (Desktop & Documents sync + Optimize Mac Storage enabled).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗