openai / openai/codex

Windows path underscores are incorrectly converted to \_ during path resolution

Open
#46,357 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug model-behavior windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.911.61220

What subscription do you have?

Pro 5x

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

I’m seeing a regression in Codex Desktop on Windows.

A valid path such as:

M:\AI\TopKingdoms_Codex_Tickets

is sometimes interpreted by Codex as:

M:\AI\TopKingdoms_Codex_Tickets

This causes Codex to look for a directory that does not exist and stop the task.

I verified that the source files are correct:

  • PATHS.json contains the normal _
  • TICKET.txt contains the normal _
  • START.txt contains the normal _
  • None of them contain \_

So the backslashes appear to be introduced by Codex while interpreting the path, possibly related to Markdown escaping.

This did not happen in my previous Codex workflow and started after a recent Codex update.

Expected:
M:\AI\TopKingdoms_Codex_Tickets

Actual:
M:\AI\TopKingdoms_Codex_Tickets

Environment:

  • Windows
  • Codex Desktop
  • Codex version: [add your version here]

I can provide screenshots if needed.

What steps can reproduce the bug?

Steps to reproduce:

  1. On Windows, create or use a folder with underscores in its name, for example:

M:\AI\TopKingdoms_Codex_Tickets

  1. Put that exact path in a plain-text file or JSON file, for example:

{
"ticket_root": "M:\AI\TopKingdoms_Codex_Tickets"
}

  1. Ask Codex Desktop to read the file and use that directory as the working/ticket path.

  2. Codex sometimes interprets the path as:

M:\AI\TopKingdoms_Codex_Tickets

  1. It then reports that the directory does not exist and stops the task.

Expected behavior:
Codex should use the literal filesystem path:

M:\AI\TopKingdoms_Codex_Tickets

Actual behavior:
Codex inserts backslashes before underscores and tries to access:

M:\AI\TopKingdoms_Codex_Tickets

I verified that the original TXT/JSON files contain normal _ characters only. They do not contain \_.

This started happening after a recent Codex Desktop update. I did not see this behavior in my previous workflow.

Code snippet:
Not applicable. This is a filesystem path parsing issue.

I can attach screenshots showing the incorrect resolved path.

Image
What is the expected behavior?

Codex should use the filesystem path exactly as provided.

For example, if the source file contains:

M:\AI\TopKingdoms_Codex_Tickets

Codex should access that exact directory and must not insert backslashes before underscores.

Expected path:
M:\AI\TopKingdoms_Codex_Tickets

It should not be changed to:
M:\AI\TopKingdoms_Codex_Tickets

Underscores in Windows filesystem paths should be treated as literal characters, not Markdown formatting.

Additional information

No response

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

Start by reproducing the Windows path-resolution case with M:\AI\TopKingdoms_Codex_Tickets and trace where underscores become escaped during interpretation. Inspect the path parsing and Markdown-related handling; done means the literal underscore path is used and the corresponding directory lookup succeeds without inserted backslashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.