Codex desktop composer misinterprets underscores in Windows paths as Markdown italics

Resolved 💬 2 comments Opened Jul 12, 2026 by wangxisu Closed Jul 12, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Environment

  • Codex desktop app on Windows
  • Plain-text content copied from a .txt file
  • 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

  1. Create a plain-text file containing:

``text
C:\Project\原型阶段_多对话协作规划\00_项目摘要_给新对话.md
``

  1. Copy the line from the text editor.
  2. Paste it into the Codex desktop composer.
  3. Observe that the text between underscores is rendered as italics and the literal underscores are no longer displayed.
  4. 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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 1 month ago

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

  • #32539

Powered by Codex Action

j2023k · 19 days ago

I can reproduce this in Codex Desktop on Windows.

The problem appears to depend on CJK text boundaries:

Input:

AAA_BBB_CCC
老和尚_ctweb_中台月刊

What the model actually received:

AAA_BBB_CCC
老和尚*ctweb*中台月刊

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.