[BUG] Claude Desktop (Code tab, macOS): claude://code/new link shows its folder but starts the session in a scratch workspace
Summary
A claude://code/new?q=…&folder=<path> link opens the new-session screen with the prompt filled in, and the screen shows <path> as the folder. When the prompt is sent from that screen, the session starts in a freshly minted scratch workspace instead of <path>. If you click any other session, then New session, and send from there, the same draft starts in <path>.
Environment
- Claude desktop app 2.2553.1 (Code tab), Claude Code 2.1.275
- macOS 14.8.7
Steps to reproduce
- Have a local git repo at
~/dev/<repo>that has been used for earlier Code sessions. - Run
open "claude://code/new?q=Reply%20with%20only%20the%20output%20of%20pwd.&folder=%2FUsers%2F<user>%2Fdev%2F<repo>". - On the new-session screen that opens, confirm the folder shown is
<repo>, then press send.
Expected
The session starts in ~/dev/<repo> and pwd prints it.
Actual
The session starts in ~/Library/Application Support/Claude/scratch-workspaces/…/scratch-<date>-<id>. main.log shows trust saved for the right folder, then a scratch workspace minted at send:
13:05:49 LocalSessions.saveTrust: cwd=/Users/<user>/dev/<repo>
13:05:49 Saved workspace trust for /Users/<user>/dev/<repo>
13:05:59 LocalSessions.createScratchWorkspace
13:05:59 [CCD] minted scratch workspace …/scratch-2026-09-18-<id>
13:05:59 Starting local session local_<id> in …/scratch-2026-09-18-<id>
Nothing is logged between saveTrust and createScratchWorkspace.
Controlled runs
Same link each time, with a one-line prompt:
| Run | Before sending | Link to send | Started in |
|---|---|---|---|
| 1 | nothing | 10s | scratch |
| 2 | clicked other sessions, came back via New session | 94s | <repo> |
| 3 | nothing, stayed on the screen | 65s | scratch |
| 4 | nothing, screen showed <repo> as the folder | 10s | scratch |
| 5 | clicked one other session, then New session | 67s | <repo> |
So it is not the prompt content and not timing. Sending from the screen the link opened loses the folder. Reloading that screen keeps it.
Other observations
- It happens for one repo (5 of 6 links since 2026-09-16), while 7 of 7 links to other repos on the same machine landed correctly. I could not tell what distinguishes that repo. It has two extra git worktrees and many earlier sessions.
- A session that lands in scratch starts in Manual even with
"permissions": {"defaultMode": "auto"}in~/.claude/settings.json. The same link reloaded as above starts in Auto. - Workaround in use: a first line in the prompt telling the sender to click another session, then New session, before sending.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗