[BUG] Cowork device_commit_files rejects every write under iCloud-synced ~/Documents: "path changed between validation and write"

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 1, 2026

Environment: Claude desktop app (Cowork), cloud session linked to a Mac. macOS with iCloud "Desktop & Documents Folders" sync on (~/Documents carries com.apple.file-provider-domain-id and com.apple.icloud.desktop xattrs).

Symptom: every device_commit_files call to a connected folder under ~/Documents is rejected with path changed between validation and write. force: true and a correct expectedMtimeMs make no difference. Nothing is written.

Repro (2026-10-01):

  1. Connected folder: ~/Documents/projects/chief.
  2. Three commits, all rejected: a new file in a subfolder, a new file at the folder root, and an overwrite of an existing file with identical content (with expectedMtimeMs).
  3. The same commit to ~/projects (same volume, not iCloud-managed) succeeds on the first try. So does a commit to ~/Claude.
  4. device_bash writes into the same ~/Documents folder succeed.

Expected: commits to iCloud-synced connected folders succeed, or the error names iCloud/File Provider as the cause.

Workaround: commit to a non-synced folder (~/Claude), then move the file with device_bash.

Related: #47241 (iCloud File Provider reverts shell operations under ~/Documents), #82930 (similar TOCTOU guard false positive under FSLogix on Windows), #85578.

Seen in at least three separate sessions.

View original on GitHub ↗