Codex VSCode extension on Windows does not properly render paths. Drops backslash.

Resolved 💬 1 comment Opened Nov 3, 2025 by maxgolov Closed Nov 4, 2025

What version of Codex is running?

openai.chatgpt@0.5.35

What subscription do you have?

Plus

Which model were you using?

gpt-5 high

What platform is your computer?

Windows 11

What issue are you seeing?

Windows paths lose backslashes unless wrapped in code (VS Code/Codex rendering)

Summary

Plain‑text Windows paths lose backslashes in the Codex VS Code experience unless wrapped in inline code.
Example:

C:\Users\maxgo\.codex\config.toml renders as C:\Users\maxgo.codex\config.toml in chat window.

Steps To Reproduce

  1. Ask the assistant to output a Windows path in plain text (not wrapped in backticks), e.g. C:\Users\YOURNAME\.codex\config.toml.
  2. Observe the rendered message: one backslash is missing: C:\Users\YOURNAME.codex\config.toml !
  3. Ask the assistant to output the same path wrapped in inline code (surrounded by backticks).
  4. Observe the rendered message: path displays correctly.

Expected Behavior

Plain text preserves backslashes.
C:\Users\YOURNAME\.codex\config.toml should display exactly as typed, OR exactly as returned by GPT.

Actual Behavior

Backslashes are stripped/unescaped in plain text. Only code‑formatted paths (inline backticks) render correctly.

Environment

  • OS: Windows 11
  • Editor: VS Code 1.105.1
  • Codex VS Code extension: openai.chatgpt@0.5.35 (latest)
  • Shell: N/A
  • Reproducible in: Chat Panel

Workarounds

Unfortunately the workarounds are unreliable:

  • Ask Agent to wrap paths in inline code: C:\Users\YOURNAME\.codex\config.toml , but that in itself is a bit problematic (extra env var, the agent struggles to edit the file itself, doesn't reload the file properly, etc.).
  • Or ask it to double backslashes in plain text: C:\Users\YOURNAME\.codex\config.toml. But unfortunately it immediately "forgets" the instruction given in the same chat shortly after.
  • Or ask it to use forward slashes: C:/Users/YOURNAME/.codex/config.toml

Additional Context

Likely a double‑unescape in the Markdown/renderer pipeline for plain text (JSON → Markdown → UI)? Or PATH normalization drops the \ from $HOME / user profile var.

Attachments

  • Screenshot(s) showing incorrect vs correct rendering.

<img width="811" height="652" alt="Image" src="https://github.com/user-attachments/assets/b04050a2-c7d1-4015-b054-4a4e3fe4158a" />

What steps can reproduce the bug?

Ask Codex VSCode extensoin to suggest what path needs to be used for storing config.toml in $env:USERPROFILE\.codex dir. It will drop the backslash in response - saying $env:USERPROFILE.codex

What is the expected behavior?

Correct path should be reported.

Additional information

Not really.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗