[BUG] Clicking a link to a folder selects it in its parent instead of opening it (Windows: explorer /select,)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 57/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
The issue identifies the click dispatcher and its Windows, macOS, and Linux branches from the Claude Code 2.1.326 binary, but names no source file or test. Start by locating the dispatcher and checking how it distinguishes files from folders on each platform. Done means folder links open the folder and file links still reveal the file; add coverage for both behaviors.
Written by the indexing model from the issue text.
Description
Environment. Claude Code 2.1.326, native install, Windows 11, Windows Terminal, full-screen views.
What happens. Clicking a file: link to a folder in a reply does not open that folder. File Explorer opens its parent with the folder selected, so it takes another double-click to get in. Going by the code below, the macOS (open -R) and Linux (FileManager1.ShowItems) branches reveal a folder the same way; I have only run the Windows one.
Why. The click dispatcher reveals every file: link and never checks whether the path is a folder. From the 2.1.326 binary:
if(r==="macos")return{command:"open",args:["-R","--",e]};
if(r==="windows")return{command:"explorer",args:[`/select,${e}`]};
return{command:"dbus-send",args:[/* ... */"org.freedesktop.FileManager1.ShowItems",`array:string:${g(e).href}`,"string:"]}
explorer /select,<folder> always shows the parent. I tried the forms a link could produce (<folder>, <folder>\, <folder>\., a trailing comma, a wildcard): each opens the parent with the folder selected, or Desktop when the path does not resolve.
Repro.
- Ask Claude to name a folder by its absolute path, such as
C:\Users\me\Documents. - Click the path in the reply.
- File Explorer opens
C:\Users\mewithDocumentsselected, notC:\Users\me\Documents.
A workaround that misleads. Pointing the link at an entry inside the folder makes /select, open the folder itself. But Explorer then selects that entry, and with the preview pane on, an image there fills the pane, so the click looks like it opened the image rather than the folder.
Expected. A link to a folder opens the folder: explorer <folder> on Windows, open -- <folder> on macOS, FileManager1.ShowFolders on Linux. Links to files can keep revealing.
Related: #105228 (the /select, window starts hidden on Windows), #82078 (Linux opens the file twice).
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 25k
- Avg merge
- 16h 19m
- Merged PRs (30d)
- 5
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anthropics/claude-code
-
area:hooks area:plugins bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anthropics/claude-code#111771 ·
-
area:docs bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anthropics/claude-code#111658 ·
-
area:core bug platform:linux platform:wsl regression
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
anthropics/claude-code#111548 ·
-
area:vscode bug has repro platform:vscode platform:windows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
anthropics/claude-code#111416 ·
-
area:plugins area:tui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anthropics/claude-code#111195 ·
All issues in anthropics/claude-code
Similar issues
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
refactor review: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
1lck/Lithe-IDEA#2376 ·
Maintainers usually reply within 1 day
-
bug extension mcp
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
primer/primitives#1426 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
danielmiessler/LifeOS#2941 ·
Maintainers usually reply within 4 days