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

Open 💬 2 comments Opened Aug 27, 2026 by xftxyz2001
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 1 day ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39902

Powered by Codex Action

ShinChoongSoo · 8 hours ago

Also reproducible in the Codex VS Code extension on Windows.

Environment:

  • Codex IDE extension: 26.5825.31414 (pre-release)
  • VS Code: 1.130.0
  • Windows NT 10.0.26200 x64
  • Bundled CLI: 0.150.0-alpha.12.2

Additional reproduction:

  1. Type short_open_tag directly into the composer.
  2. Send the message.
  3. The persisted user message contains short\_open\_tag with two literal backslashes.
  4. Recalling and resending the previous prompt causes the escapes to accumulate, producing short\\\_open\\\_tag.

A separate local test injected short_open_tag directly through the bundled app-server. It was persisted unchanged with zero backslashes. This narrows the problem to the IDE webview composer/history serialization path rather than the app-server or session writer.

No raw session file is attached because it contains unrelated private conversation data.