Skip to content

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

Description

@xftxyz2001

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions