Desktop (Windows): claude://code/new?folder= adds the folder to the open workspace instead of opening a new window, re-prompting for trust every time
Summary
On Windows, opening a claude://code/new?q=<prompt>&folder=<path> deep link while the Claude desktop app is already running does not open a new window/workspace. Instead it adds folder to the workspace that is already open, and because adding a folder to a workspace always asks for confirmation, the "Do you trust this workspace?" dialog appears on every link, even for a folder that is used daily and has already been trusted.
Side effect: since every link appends a folder to the same window, unrelated projects end up mixed into a single workspace.
Steps to reproduce
- Open the Claude desktop app (Code tab) with any folder, e.g.
C:\Users\me\project-a. - From another app (browser, a custom
wolfclaude://handler,startfrom a shell), open:
claude://code/new?q=hello&folder=C:\Users\me\project-b
- Observe: no new window.
project-bis added to the open workspace and the trust dialog appears, showingproject-aas the workspace while the folder row showsproject-b. - Repeat with a folder that was already trusted → the dialog appears again.
Cold start behaves as expected: with the app closed, the same link opens one window and asks once.
What I found in the handler (app.asar; first seen on MSIX Claude_1.37937.3.0_x64, re-checked on 1.46388.3.0, same code path)
- The
code/newURL handler accepts onlyq(aliasprompt),folder(repeatable) andfile(repeatable), and tags the request assrc=external. There is no parameter to request a new window. - It always navigates the existing window (
webContents→dispatchNavigate/loadURL); it never creates a newBrowserWindow. That is why the folder is appended to the open workspace and the trust prompt fires every time. - The public
claude-cli://open?q=&cwd=&repo=scheme opens a terminal session, not an in-app session, so it is not an alternative for this use case.
Expected
Either of these would solve it:
code/newopens a new window/workspace when the app is already running (or accepts an explicit flag such aswindow=new), or- adding a folder via deep link does not re-ask for trust when that folder is already trusted.
Context
We use the deep link from an internal ticketing/ERP tool: a button on a ticket opens a Claude Code session in the project the ticket belongs to. With the current behaviour every ticket click re-prompts for trust and stacks projects into one window.
Environment: Windows 11 Home 10.0.26200, Claude desktop app (MSIX) 1.46388.3.0 (behaviour first observed on 1.37937.3.0).