[Windows] "Open in File Explorer" on existing C:\Users\... links opens C:\Users instead of the file location
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Environment
- Codex Desktop for Windows (packaged app), app-server
codex-cli 0.153.0-alpha.5, install hash994e8469124a0d31, as of 2026-09-03 - OS: Windows NT 10.0.28000.0 (custom "X-Lite" image, stock
explorer.exe) - Local host
Summary
Right-clicking a rendered local-file link in chat and choosing Open in File Explorer opens C:\Users instead of the file's containing folder whenever the link target lives under C:\Users\.... The target files exist on disk and the paths are plain ASCII.
Repro
- Paste a screenshot into the chat. Codex saves it to
C:\Users\<user>\AppData\Local\Temp\codex-clipboard-<uuid>.pngand renders a link to it. - Confirm the file exists on disk (it does;
Test-Pathreturns True). - Right-click the rendered link → Open in File Explorer.
- Expected: Explorer opens
...\AppData\Local\Tempwith the PNG selected. - Actual: Explorer opens
C:\Users. Reproduces consistently forC:\Users\...targets.
Observations
- Links under
E:\...reveal correctly, so the reveal action itself works. - Running
explorer /select,"<full path>"outside the app works fine. - The failure lands exactly at
C:\Users— the target appears truncated at the\Uboundary, consistent with\Ubeing consumed as an escape prefix while parsing the markdown link target. This is the same escape-mangling family as #28439, where\.before dot-directories is dropped. - #14079 comments note the Windows package calls
showItemInFolder(...)with anopenPath(...)fallback; opening the truncatedC:\Usersprefix through that fallback would produce exactly this symptom.
Related but distinct issues
- #28439: separator dropped before
.codex(\.escape) — same family, different mangling and different symptom. - #38668: "Open in folder" falls back to
C:\for mapped-drive/UNC project files — different trigger. - #14079: broader Windows local-link parsing (
/C:/prefixing, drive-letter classification, non-ASCII percent-encoding).
Requested fix
Pass the unmodified native path to the reveal action (or normalize/protect backslash escapes before markdown link-target parsing), and add regression coverage for reveal-in-Explorer with user-profile paths such as C:\Users\<user>\AppData\....
Contributor 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.
Research direction
Trace the Windows reveal path through showItemInFolder(...) and its openPath(...) fallback, then inspect how local-file markdown link targets parse backslashes. Add regression coverage for a C:\Users... path and verify that Open in File Explorer opens its containing folder with the file selected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100