[Windows desktop] Copy as path escapes underscores as \_ and breaks file resolution
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.908.9136.0
What subscription do you have?
ChatGPT subscription; exact tier is not shown in the Codex app UI
What platform is your computer?
Windows x64
What issue are you seeing?
When a Windows path copied with File Explorer's Ctrl+Shift+C is pasted into the Codex Desktop composer, underscores can be serialized as Markdown escapes in the persisted and model-visible message.
Original clipboard path:
C:\Users\<user>\Desktop\frame_000010.jpg
Persisted path in the session JSONL:
C:\Users\<user>\Desktop\frame\_000010.jpg
This is not only visual. The agent interpreted the inserted backslash as a Windows directory separator, checked a nonexistent path, and incorrectly told the user that the supplied path was wrong. The real file existed and opened successfully at the original path.
What steps can reproduce the bug?
- On Windows, create or select a file named
frame_000010.jpgin File Explorer. - Press Ctrl+Shift+C to use Copy as path.
- Paste the quoted path into a local Codex Desktop task and send the message.
- Ask Codex to inspect or open the file.
- Inspect the corresponding session JSONL under
%USERPROFILE%\.codex\sessions.
The raw user message contains frame\_000010.jpg instead of frame_000010.jpg. A literal filesystem check fails for the escaped form and succeeds for the original form.
What is the expected behavior?
Pasted Windows paths should remain byte-for-byte identical in the model-visible message and session storage. If the composer uses Markdown escaping for display, the model-facing and filesystem layers must decode that escape before resolving the path.
frame_000010.jpg must never be interpreted as frame\_000010.jpg.
Additional information
Reproduced on 2026-09-17 with the current Windows package listed above.
Possibly related to #39844 and the duplicate #39902. This report narrows the case to direct File Explorer Copy as path in a current local Windows Desktop task, with immediate sent-message and filesystem impact. It does not require switching chats or repeatedly restoring an unsent draft.
No raw session file is attached because it contains unrelated private conversation content. A minimized, redacted excerpt can be provided if maintainers request it.
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
Reproduce the Windows Desktop flow using File Explorer’s Ctrl+Shift+C, then compare the pasted message with its corresponding JSONL under %USERPROFILE%.codex\sessions. Trace how the composer serializes the path and how the model-facing and filesystem layers consume it. Done means frame_000010.jpg remains identical in the sent message and session storage, and the original file resolves successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100