[BUG] Cowork device_commit_files rejects every write under iCloud-synced ~/Documents: "path changed between validation and write"
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):
- Connected folder: ~/Documents/projects/chief.
- 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). - The same commit to ~/projects (same volume, not iCloud-managed) succeeds on the first try. So does a commit to ~/Claude.
device_bashwrites 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.