OneDrive keeps processing files in excluded folders (EnableODIgnoreFolderListFromGPO), causing a HandleRecycledFile sync loop

David Fernández Fernández 0 Reputation points
2026-11-24T17:06:10.0766667+00:00

Environment

  • Windows 11 Enterprise 26200, OneDrive for Business sync client 26.212.1029.0006 (domain-joined, university tenant)
  • Folder-name exclusions set with the policy HKLM\SOFTWARE\Policies\Microsoft\OneDrive\EnableODIgnoreFolderListFromGPO (.venv, venv, node_modules, target, pycache, .mypy_cache, dist, …). The policy works: the folders show "Excluded" (System.StorageProviderState = 9) and are not uploaded.
  • No junctions, symlinks or hardlinks inside the sync root (checked; both were earlier causes of similar loops and are fixed).

Problem

Even though the folders are excluded, OneDrive keeps handling every file inside them. With about 190,000 files in excluded folders (seven Python .venv folders of 9,000–40,000 files each, and two Rust target folders with 19,000 files), the sync client:

  • wrote a new 1 MB .odl log file every ~2 seconds in %LOCALAPPDATA%\Microsoft\OneDrive\logs\Business1 (175 files, 173 MB in one hour);
  • filled the logs with DriveChangeGenerator::HandleRecycledFile, followed by Excluded … NotInSync, for those files (about 8,000 per minute, each path distinct, cycling through the excluded content);
  • slowed uploads and downloads of normal files heavily.

Deleting the excluded content while OneDrive was quit did not stop it immediately: after a restart, OneDrive worked through the deleted items the same way. What finally reduced it was moving the generated folders out of the OneDrive folder entirely: venvs to a local path via uv's UV_PROJECT_ENVIRONMENT, and Cargo builds via target-dir. That cut the files in excluded folders from 189,580 to 13,257.

Steps to reproduce

  1. Exclude .venv with EnableODIgnoreFolderListFromGPO and restart OneDrive.
  2. In a synced folder, create a Python project and run uv sync (or npm install, or cargo build), producing 20,000+ files in the excluded folder.
  3. Rebuild or delete the environment a few times and watch the Business1 log folder.

Questions

  1. Is it expected that the sync engine keeps enumerating and processing items in folders excluded by EnableODIgnoreFolderListFromGPO? Is there a setting that makes OneDrive skip excluded folders completely (not watch or track them)?
  2. Is there a supported way to clear already-tracked excluded items from the sync database without a full reset? (OneDrive.exe /reset failed on this machine.)
  3. Is a per-folder, user-level ignore file (gitignore-style) planned, or will the admin folder exclusions (roadmap 567470) behave differently from the current policy?
Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments

1 answer

Sort by: Oldest
  1. Chris-D 2,720 Reputation points Independent Advisor
    2026-11-24T21:34:04.23+00:00

    Hi David,

    Thank you for sharing the detailed information.

    The exclusion policy appears to be working, as the folders are marked as Excluded and their contents are not uploaded. However, the available documentation does not confirm whether excluded folders should be completely ignored by the sync engine or whether local changes may still be enumerated.

    I am not aware of a supported setting that prevents OneDrive from watching these folders entirely, or a supported method to selectively remove already-tracked excluded items from the local sync database. Manually deleting the database or ODL files would not be recommended.

    For now, keeping high-churn folders such as .venv, node_modules, and Cargo target outside the OneDrive sync root is the safest workaround.

    Given the reproducible log growth and performance impact, this would be best investigated through a Microsoft Support request. If you have access to the Microsoft 365 admin center, you can open one directly. Otherwise, please ask the IT team or administrator managing the tenant to open one on your behalf and include the relevant ODL logs, reproduction timestamps, OneDrive version, and policy configuration.

    Regarding a user-level .gitignore-style option, the announced folder-exclusion feature is administrator-managed. I am not aware of a confirmed user-managed ignore-file feature at this time.

    I hope this helps move the case forward. Should you have any further questions or need additional assistance, please feel free to share them in the comments below. I will be happy to help.  


    If the answer is helpful, please click "Yes" and kindly upvote it.

    Note: Follow the steps in the forum documentation to enable email notifications if you want to receive email notifications related to this topic.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.