openai / openai/codex

[IDE extension][Windows] Pasting paths escapes underscores as \_

Open
#41,063 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug extension windows-os
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?
  1. Open the Codex sidebar in VS Code on Windows.
  2. Copy a Windows path containing one or more underscores, for example C:\work\my_project\test_file.py.
  3. Paste the path into the Codex composer.
  4. 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, and backslash and did not find the same IDE extension issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.