[BUG] Claude Code always checks managed-settings.json under C:\Program Files on Windows installations with a non-C: system drive

Open 💬 0 comments Opened Jul 15, 2026 by akukanara

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

On Windows systems where the operating system is installed on a drive other than C:, Claude Code always attempts to load the managed policy file from:

C:\Program Files\ClaudeCode\managed-settings.json

instead of using the actual Program Files directory.

My Windows installation uses:

SystemDrive = M:
ProgramFiles = M:\Program Files

Despite this, claude doctor reports:

Invalid settings

  • C:\Program Files\ClaudeCode\managed-settings.json:

Settings file could not be read:
EUNKNOWN: unknown error,
stat 'C:\Program Files\ClaudeCode\managed-settings.json'

Claude Code itself works normally, but the invalid settings warning is always shown.

What Should Happen?

Claude Code should resolve the Program Files directory using the Windows configuration (e.g. %ProgramFiles% or the appropriate Windows API) instead of assuming it is always located at C:\Program Files.

If no managed policy file exists, it should simply continue without reporting an invalid settings warning.

Error Messages/Logs

Claude Code doctor

Running: native (2.1.208)
Commit: 1ee05a7fb989
Platform: win32-x64
Path: M:\Users\ahmad\.local\bin\claude.exe
Config install method: native
Search: OK (bundled)
Auto-updates: enabled
Auto-update channel: latest
Last update attempt: success → 2.1.208 (2026-07-14)

Invalid settings
- C:\Program Files\ClaudeCode\managed-settings.json:
  Settings file could not be read:
  EUNKNOWN: unknown error,
  stat 'C:\Program Files\ClaudeCode\managed-settings.json'

No installation issues found.


Unable to read managed policy settings.
This machine may require organization login enforcement, but the policy file failed to load.
Contact your administrator.

Detail: C:\Program Files\ClaudeCode\managed-settings.json: Settings file could not be read: EUNKNOWN: unknown error,
stat 'C:\Program Files\ClaudeCode\managed-settings.json'

Steps to Reproduce

  1. Install Windows on a drive other than C: (e.g. M:).
  2. Verify:
  • %SystemDrive% = M:
  • %ProgramFiles% = M:\Program Files
  1. Install Claude Code.
  2. Run:

claude doctor

  1. Observe that Claude Code attempts to read:

C:\Program Files\ClaudeCode\managed-settings.json
instead of using the actual Program Files directory.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.210 ( Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

The issue only affects the managed settings lookup. Claude Code otherwise functions normally.

Environment:

SystemDrive = M:
ProgramFiles = M:\Program Files

This suggests the managed policy lookup may be using a hardcoded path instead of resolving the actual Program Files directory provided by Windows.

View original on GitHub ↗