File sync now stages files in a private, permission-checked folder and skips it during cleanup
When Claude Code syncs files, it now moves them through a dedicated staging folder that is locked down to the current user only (permission mode 0700, meaning only the owner can read, write or enter it). Before using this folder, Claude Code checks that it and its parent folder are genuinely owned by the current user with no group or other access. If the check fails, it deletes the folder and refuses to use it, reporting one of several specific reasons: it could not be created, it is not owned solely by the current user (which can happen on drives that don't preserve file permissions), or it turned out to be a symbolic link or another user's folder.
The existing cleanup routine that removes old staging folders has also been updated to skip the one that is currently in active use.
This prevents another user on a shared machine from tampering with or reading files while they're being staged for sync, and stops the cleanup process from accidentally deleting a staging folder that a sync is actively using.