codex - 💡(How to fix) Fix Codex Desktop sometimes shows local Markdown files as raw text instead of rendered preview

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

I am intentionally not attaching the original file because it contained workspace/client-sensitive content, but the file shape was ordinary Markdown.

Code Example

# 2026-05-17 Example Report

## TL;DR

This is a normal Markdown report.

## Table

| Client | Total | Flag |
|---|---:|---:|
| Example | 78,553 | 0 |
RAW_BUFFERClick to expand / collapse

What happened

Codex Desktop sometimes displays a local .md file as raw source text instead of using the Markdown-rendered preview, while other Markdown files in the same workspace render correctly.

The file I hit this with was a normal small Markdown document: headings, bullets, and GitHub-style tables. It was not malformed, was ASCII-only, and was about 3.5 KB. file -I reports text/plain; charset=us-ascii, which is normal for a local Markdown file on macOS but may be related if the viewer is using MIME detection instead of the .md extension.

I am intentionally not attaching the original file because it contained workspace/client-sensitive content, but the file shape was ordinary Markdown.

Expected behavior

Local files with a .md extension should render consistently in the Markdown preview path, regardless of whether OS MIME detection reports text/plain. Headings, bullets, and tables should render like other Markdown files do in Codex Desktop.

Actual behavior

The same class of local Markdown file sometimes appears as raw text, showing literal # headings and pipe-table syntax. Other Markdown files preview with the expected formatting.

Notes / possible cause

This may be a viewer-path inconsistency rather than a Markdown parser issue:

  • Markdown shown as assistant output or artifact preview renders correctly.
  • Markdown surfaced through prior-thread context, tool output, or a generic local-file viewer path appears to fall back to raw text.
  • The affected file was valid Markdown and small enough that size should not be forcing a raw fallback.

Environment

  • Codex Desktop on macOS
  • macOS: 26.4.1 (25E253)
  • codex --version: codex-cli 0.124.0

Sanitized repro shape

Create a small local file such as /Users/<user>/workspace/context/proj-example/2026-05-17-example.md with headings, bullets, and a Markdown table:

# 2026-05-17 Example Report

## TL;DR

This is a normal Markdown report.

## Table

| Client | Total | Flag |
|---|---:|---:|
| Example | 78,553 | 0 |

Then open/reference it from a Codex Desktop thread and compare against other .md files opened in the same workspace. The bug is that some are shown as raw text instead of rendered Markdown, despite having a .md extension and valid Markdown content.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Local files with a .md extension should render consistently in the Markdown preview path, regardless of whether OS MIME detection reports text/plain. Headings, bullets, and tables should render like other Markdown files do in Codex Desktop.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop sometimes shows local Markdown files as raw text instead of rendered preview