After a system restart, OneDrive for Business may enter a sync loop on shared libraries. The sync client repeatedly starts, stops, or shows “Processing changes” without completing. This issue often affects hybrid teams who access shared libraries from both office and remote networks. The root cause is typically a corrupted sync metadata cache or a conflict between the local sync engine and the server’s change tracking. This article explains why the loop occurs and provides specific steps to stop the cycle and restore normal sync.
Key Takeaways: Fixing OneDrive Shared Library Sync Loop After Restart
- OneDrive settings > Sync and backup > Manage backup: Temporarily stop syncing all shared libraries to break the loop.
- %LocalAppData%\Microsoft\OneDrive\settings\Business1: Delete the ClientPolicy and MachineGlobal files to reset cached sync policies.
- Taskkill /f /im OneDrive.exe: Force-stop the OneDrive process before clearing cache files to prevent file locks.
Why OneDrive Sync Loops on Shared Libraries After Restart
OneDrive maintains a local metadata cache for each shared library. This cache records file versions, sync states, and server change tokens. When Windows restarts, OneDrive reloads this cache and compares it with the server metadata. If the cache becomes corrupted — due to improper shutdown, network interruptions, or simultaneous edits from hybrid team members — the comparison fails. OneDrive then attempts to re-sync the entire library. But each attempt encounters the same corruption, causing the client to restart the sync process repeatedly. The loop manifests as a continuous “Processing changes” or “Sync pending” status that never resolves.
Hybrid teams are especially prone to this problem because shared libraries are accessed from multiple devices and network environments. A file saved from a VPN connection may have a different change token than one saved from the office LAN. When OneDrive tries to reconcile these tokens after restart, the mismatch triggers the loop. Additionally, if the library contains more than 300,000 items, the sync engine may exceed its internal time limit and restart the process instead of completing it.
Steps to Stop the Sync Loop and Restore Normal Operation
- Force-stop OneDrive and end all related processes
Open Task Manager with Ctrl+Shift+Escape. Find OneDrive.exe in the Processes tab. Right-click it and select End task. Also end any Microsoft Office background processes that may hold file locks on the synced folders. This ensures no files are locked when you clear the cache. - Pause syncing for all shared libraries
Restart OneDrive from the Start menu. Right-click the OneDrive cloud icon in the system tray. Select Settings > Sync and backup > Manage backup. For each shared library listed under Shared libraries, click Stop sync. Confirm when prompted. This removes the libraries from the active sync queue without deleting local files. - Clear the local sync metadata cache
Open File Explorer and paste this path into the address bar:%LocalAppData%\Microsoft\OneDrive\settings\Business1. Press Enter. Delete the following files: ClientPolicy and MachineGlobal. Do not delete the entire folder. These files store cached sync policies and machine-specific settings. Deleting them forces OneDrive to download fresh policy data from the server on next launch. - Reset the OneDrive sync engine
Press Windows+R, type%localappdata%\Microsoft\OneDrive\OneDrive.exe /reset, and press Enter. A command window flashes briefly. Wait 30 seconds. OneDrive should restart automatically. If it does not, launch OneDrive manually from the Start menu. The reset command clears the internal sync database without affecting your local files. - Re-add the shared libraries
Right-click the OneDrive cloud icon and select Settings > Sync and backup > Manage backup. Click Add a folder next to Shared libraries. Browse to the shared library location or paste its URL. Select the folders you want to sync. Click Start sync. OneDrive will download fresh metadata from the server, avoiding the corrupted cache that caused the loop.
If OneDrive Still Loops After the Main Fix
OneDrive sync loop persists on a specific library only
If the loop continues for one library but others sync normally, the library may have a corrupted server-side change log. Ask the SharePoint Online administrator to run the Check In and Publish commands on all files in the library. Alternatively, the admin can create a new document library and move the content using SharePoint Migration Tool. This eliminates any hidden corruption in the original library’s sync metadata.
OneDrive shows “We can’t sync this library” after clearing cache
This error appears when the library URL contains a space or special character that the sync engine cannot parse. Open the library in a web browser. Copy the URL from the address bar. In OneDrive settings, remove the library and re-add it using the exact URL. Ensure the URL ends with /Shared%20Documents or the correct encoded path. Do not use the friendly name shown in the browser tab.
Loop occurs only when the device is connected to VPN
VPN configurations sometimes block the TCP ports used by OneDrive sync (443, 80, and 9877). Check with your network team to ensure these ports are open for the VPN connection. As a temporary workaround, disconnect from VPN, force-stop OneDrive, clear the cache using the steps above, and then reconnect to VPN before restarting OneDrive.
Shared Library Sync Loop vs Standard Sync Loop: Key Differences
| Item | Shared Library Sync Loop | Standard OneDrive Sync Loop |
|---|---|---|
| Affected scope | One or more SharePoint or Teams shared libraries | Personal OneDrive folder only |
| Root cause | Corrupted metadata cache or server change token mismatch | Local file conflicts or large file count |
| Cache location | %LocalAppData%\Microsoft\OneDrive\settings\Business1 |
%LocalAppData%\Microsoft\OneDrive\settings\Personal |
| Fix complexity | Requires admin access to SharePoint Online for severe cases | Resolved with local reset or file exclusion |
After completing the steps above, you can now sync shared libraries without the restart loop. If the issue recurs, check the Windows Event Viewer under Applications and Services Logs > Microsoft > Windows > OneDrive for Business for error codes 0x8007017C or 0x8007018B, which indicate metadata corruption. As an advanced preventive measure, configure OneDrive to delay sync start by 30 seconds using the Group Policy setting “Set the maximum delay before sync starts” under Computer Configuration > Administrative Templates > OneDrive. This gives the network stack time to initialize before the sync engine loads.