Codex desktop composer misinterprets underscores in Windows paths as Markdown italics
Environment
- Codex desktop app on Windows
- Plain-text content copied from a
.txtfile - The pasted content contains Windows paths with Chinese characters and underscores
Description
The Codex desktop composer automatically applies rich-text/Markdown formatting after plain text is pasted.
When a Windows path contains multiple underscores, text between the underscores is interpreted as Markdown emphasis. The underscores disappear visually and the middle part of the real file path becomes italicized. This can change or make the path ambiguous before the message is sent.
Using Ctrl+Shift+V does not prevent the behavior because the composer applies formatting after the plain-text paste.
Lines beginning with - may also be automatically converted into rich-text bullet items, showing that the conversion is happening inside the composer rather than in the source text.
Reproduction steps
- Create a plain-text file containing:
``text``
C:\Project\原型阶段_多对话协作规划\00_项目摘要_给新对话.md
- Copy the line from the text editor.
- Paste it into the Codex desktop composer.
- Observe that the text between underscores is rendered as italics and the literal underscores are no longer displayed.
- Repeat using Ctrl+Shift+V; the same formatting occurs.
Expected behavior
Windows paths pasted as plain text should remain literal, including all underscores and backslashes.
At minimum, the composer should offer one of the following:
- do not apply emphasis formatting inside path-like text;
- a reliable "paste as plain text" command that bypasses composer auto-formatting;
- a setting to disable Markdown/rich-text input rules.
Actual behavior
The composer treats valid underscores in Windows paths as Markdown emphasis delimiters. This makes paths visually incorrect and can cause ambiguity for Codex when the message is processed.
Current workaround
Wrapping every path in inline backticks preserves it, but this requires manually editing prompts before pasting and is easy to forget.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce this in Codex Desktop on Windows.
The problem appears to depend on CJK text boundaries:
Input:
What the model actually received:
The all-ASCII identifier preserves its underscores, while the same underscore pattern adjacent to Chinese text is converted to Markdown asterisks.
This is not only a visual rendering issue: the assistant confirmed that the actual message it received contained
*ctweb*, not_ctweb_.This suggests that the composer's emphasis or word-boundary detection may not be Unicode/CJK-aware. It can silently corrupt filenames, directory paths, identifiers, and variable names containing mixed CJK/ASCII text.