[BUG] Windows: un-canonicalized path keys in ~/.claude.json create duplicate project entries, silently resetting folder trust → Auto mode disappears and every command prompts

Open 💬 0 comments Opened Jun 17, 2026 by cyconx

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?

Environment

  • Claude Code CLI (terminal), Windows 11
  • Version ~2.1.154 (lastOnboardingVersion in ~/.claude.json)
  • Multiple surfaces in use on the same machine: Claude Code CLI, Claude Desktop app,

VS Code extension; terminals in both PowerShell 7 and Windows PowerShell 5.1

Summary

On Windows, project identity in ~/.claude.json is keyed on the raw, un-normalized
path string
. Different surfaces / launches normalize the path differently (drive-letter
case and / vs \), so the same physical folder forks into several projects[...]
entries. The active session can end up keyed to a freshly-created entry with
hasTrustDialogAccepted: false, which (a) makes every command prompt with no persist
option, and (b) removes Auto mode and the fuller set from the Shift+Tab permission-mode
menu. The Desktop app / Chat / Cowork are unaffected (separate store), so it looks
surface-specific and is very hard to diagnose.

What Should Happen?

All spellings of the same physical folder resolve to one canonical project entry;
trust, approvals, and permission mode persist regardless of how the path was spelled.

Error Messages/Logs

- `projects` fragments into one entry per spelling. Observed on a real machine:

Steps to Reproduce

  1. Work in a trusted project, e.g. C:\Repos\myproj, on Auto mode — commands auto-approve.
  2. Launch additional CLI sessions / test the "Claude Code Terminals" flow such that the

project path is passed with different normalization (e.g. c:/Repos/myproj,
C:/Repos/myproj, C:\Repos\myproj).

  1. Inspect ~/.claude.jsonprojects.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.178 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗