[IDE extension][Windows] Pasting paths escapes underscores as \_
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the IDE extension are you using?
26.5820.71523
What subscription do you have?
ChatGPT subscription (the exact tier is not displayed in the IDE extension)
Which IDE are you using?
Visual Studio Code 1.135.0 (x64)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
When a Windows path containing underscores is pasted into the Codex IDE extension composer, the composer inserts Markdown escape backslashes before the underscores.
Original clipboard text:
C:\work\my_project\test_file.py
Text after pasting:
C:\work\my\_project\test\_file.py
The added backslashes are not part of the original Windows path. If the serialized Markdown text is later used for path resolution without unescaping it first, Codex may look for a nonexistent path.
What steps can reproduce the bug?
- Open the Codex sidebar in VS Code on Windows.
- Copy a Windows path containing one or more underscores, for example
C:\work\my_project\test_file.py. - Paste the path into the Codex composer.
- Observe that each
_may be changed to\_.
What is the expected behavior?
Pasting a filesystem path should preserve its characters exactly. The path should remain:
C:\work\my_project\test_file.py
Alternatively, the IDE extension could expose a plain-text composer setting equivalent to the "Plain text editor" option in the Windows desktop app.
Additional information
- The Windows desktop app has a "Plain text editor" setting that prevents this problem by preserving code, Markdown, and links as plain text.
- The VS Code Codex extension currently has no equivalent setting in its documented editor settings.
- This appears to be a composer rich-text/Markdown serialization issue rather than a PowerShell or Windows path rule.
- I searched existing open and closed issues using terms including
underscore,Windows path,Markdown,paste, andbackslashand did not find the same IDE extension issue.
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
No source file or test is named. Start by locating the VS Code extension composer’s paste handling and Markdown or rich-text serialization, then reproduce the issue on Windows with a path containing underscores. Done means pasted filesystem paths preserve their original characters without added escape backslashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100