Skip to content

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

Closed

Description

@maxgolov

What version of Codex is running?

[email protected]

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: [email protected] (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.
Image

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.

Activity

  1. added
    bug
    on Nov 3, 2025
  2. added
    extension
    windows-os
    on Nov 3, 2025
  3. dylan-hurd-oai commented on Nov 4, 2025

    @dylan-hurd-oai
    Contributor

    This has been fixed in 0.5.36, and will be included in the next mainline release

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

    bugextensionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions