claude-code - 💡(How to fix) Fix [BUG] Trust dialog infinite loop with UNC/SMB paths on Citrix environment (Windows MSIX) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46969Fetched 2026-04-13 05:44:59
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

Error Messages/Logs

2026-04-12 13:06:16 [warn] [CCD] Failed to parse settings file C:\Users\Florian.Zauner.claude\settings.json for defaultMode: Unexpected token '', "{ "trus"... is not valid JSON

Root Cause

Root cause analysis from log investigation:

  • saveTrust is called and reports "Saved workspace trust" successfully
  • checkTrust is triggered again immediately after, ignoring the saved value
  • This creates an infinite saveTrust → checkTrust loop
  • No log entry ever references "trustedPaths" or "settings.json" during trust checks, suggesting trustedPaths is not implemented for the Desktop App's trust flow

Fix Action

Fix / Workaround

Additional context:

  • The same UNC path is sometimes resolved differently depending on the session (\ngr.local\CTXFarm... vs \NGR-FILE\CTXFarm$...), causing trust to never match
  • Adding trustedPaths to settings.json has no effect – the log shows no evidence of settings.json being read for trust checks
  • Workarounds attempted: subst drive mapping, trustedPaths in both %USERPROFILE%.claude\settings.json and the MSIX sandbox path %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\settings.json – none resolved the issue

Current workaround:

  • Using Claude Code via PowerShell terminal with ANTHROPIC_API_KEY set in PowerShell profile
  • This does not use the Pro subscription and incurs API costs

Code Example

2026-04-12 13:06:16 [warn] [CCD] Failed to parse settings file C:\Users\Florian.Zauner\.claude\settings.json for defaultMode: Unexpected token '', "{ "trus"... is not valid JSON

2026-04-12 13:06:25 [info] LocalSessions.checkTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:26 [info] LocalSessions.saveTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:27 [info] Saved workspace trust for \\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:27 [info] LocalSessions.checkTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:28 [info] LocalSessions.saveTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:28 [info] Saved workspace trust for \\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:28 [info] LocalSessions.checkTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
... (repeats indefinitely)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When selecting any folder via the Desktop App's "Select folder" button in the Code tab, an infinite trust dialog loop occurs. The dialog asks "Do you trust this location?" – clicking "Yes" saves the trust, but the dialog immediately reappears. This repeats indefinitely and the Code tab never becomes usable.

The same behavior occurs for every UNC path selected, regardless of the path.

Additionally, the OAuth login does not persist in the Code tab terminal. Running claude auth login reports success, but claude auth status immediately after shows loggedIn: false.

What Should Happen?

  1. Clicking "Yes" on the trust dialog should permanently trust the folder – the dialog should not reappear for the same path
  2. trustedPaths in settings.json should suppress the trust dialog entirely for listed paths
  3. OAuth login via claude auth login should persist across sessions

Error Messages/Logs

2026-04-12 13:06:16 [warn] [CCD] Failed to parse settings file C:\Users\Florian.Zauner\.claude\settings.json for defaultMode: Unexpected token '', "{ "trus"... is not valid JSON

2026-04-12 13:06:25 [info] LocalSessions.checkTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:26 [info] LocalSessions.saveTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:27 [info] Saved workspace trust for \\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:27 [info] LocalSessions.checkTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:28 [info] LocalSessions.saveTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:28 [info] Saved workspace trust for \\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
2026-04-12 13:06:28 [info] LocalSessions.checkTrust: cwd=\\NGR-FILE\01-Office$\Electrical_Engineering\FLZA\01_Prozessoptimierung\TIA Konfigurator
... (repeats indefinitely)

Steps to Reproduce

  1. Install Claude Desktop (MSIX/Windows Store version) on a Citrix environment where all drives are UNC/SMB network shares
  2. Open Claude Desktop → Code tab
  3. Click "Select folder"
  4. Select any folder on a UNC path (e.g. \SERVER\Share\ProjectFolder)
  5. Trust dialog appears: "Do you trust this location?"
  6. Click "Yes" / "Trust"
  7. Dialog immediately reappears → infinite loop

Additional context:

  • The same UNC path is sometimes resolved differently depending on the session (\ngr.local\CTXFarm... vs \NGR-FILE\CTXFarm$...), causing trust to never match
  • Adding trustedPaths to settings.json has no effect – the log shows no evidence of settings.json being read for trust checks
  • Workarounds attempted: subst drive mapping, trustedPaths in both %USERPROFILE%.claude\settings.json and the MSIX sandbox path %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\settings.json – none resolved the issue

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.104 (Claude Code) Claude Desktop: 1.1617.0.0

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Windows 11, Citrix Virtual Apps environment Install type: MSIX (Claude_1.1617.0.0_x64__pzs8sxrjxfjjc) All user drives are SMB/UNC network shares – including C:\Users\ which is redirected to \NGR-FILE\CTXFarm$\Userdata\

Root cause analysis from log investigation:

  • saveTrust is called and reports "Saved workspace trust" successfully
  • checkTrust is triggered again immediately after, ignoring the saved value
  • This creates an infinite saveTrust → checkTrust loop
  • No log entry ever references "trustedPaths" or "settings.json" during trust checks, suggesting trustedPaths is not implemented for the Desktop App's trust flow

OAuth issue root cause:

  • claude auth login completes successfully in browser
  • Token is not written to %USERPROFILE%.claude\ or the MSIX sandbox path
  • claude auth status immediately shows loggedIn: false
  • Likely related to the MSIX sandbox preventing writes to the expected token storage location

Current workaround:

  • Using Claude Code via PowerShell terminal with ANTHROPIC_API_KEY set in PowerShell profile
  • This does not use the Pro subscription and incurs API costs

extent analysis

TL;DR

The issue can be mitigated by manually editing the settings.json file to include the trusted paths and ensuring the file is properly formatted, as the current issue seems to stem from the application not reading the settings.json file correctly due to a parsing error.

Guidance

  1. Verify settings.json formatting: Ensure that the settings.json file does not contain any unexpected tokens, such as '', which could be causing the parsing error. This token often appears at the beginning of files edited in certain text editors that save files with a Byte Order Mark (BOM).
  2. Manually add trusted paths: Despite the issue with the application not recognizing trustedPaths in settings.json, try manually adding the UNC paths to the trustedPaths array in the settings.json file. This might help if the parsing issue is resolved.
  3. Check for MSIX sandbox limitations: The OAuth issue might be related to the MSIX sandbox environment preventing writes to the expected token storage location. Investigate if there's a way to configure the MSIX package or the application to handle token storage differently.
  4. Alternative authentication method: Consider using an alternative method for authentication that does not rely on the MSIX sandbox environment, such as using environment variables for the API key as mentioned in the current workaround.

Example

To manually edit the settings.json file, ensure it looks something like this:

{
  "trustedPaths": [
    "\\\\\\\\\\NGR-FILE\\\\01-Office$\\\\Electrical_Engineering\\\\FLZA\\\\01_Prozessoptimierung\\\\TIA Konfigurator"
  ]
}

Replace the path with the actual UNC path you are trying to trust. Note that the example provided in the issue does not directly translate to a JSON string due to the nature of UNC paths and JSON escaping.

Notes

The provided solution is based on the information given and might not fully resolve the issue due to the complexities of the MSIX sandbox environment and the application's handling of trusted paths and OAuth authentication. Further investigation into the application's code and the MSIX configuration might be necessary for a complete fix.

Recommendation

Apply the workaround of manually editing the settings.json file and investigate alternative authentication methods that do not rely on the MSIX sandbox environment, as these seem to be the most direct ways to mitigate the issues described.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING