openai / openai/codex

VS Code Codex chat code blocks lose syntax highlighting / render monochrome on latest VS Code

Open
#41,659 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

In the latest VS Code with the latest Codex extension, fenced code blocks in the Codex chat panel are no longer syntax-highlighted and render almost entirely in a single white/gray color.

The normal VS Code editor still has correct syntax highlighting, so the problem appears isolated to the Codex chat/webview renderer rather than VS Code's editor tokenization or the language extension.

Reproduction
  1. Open the Codex extension in VS Code.
  2. Ask: show me a sample java code.
  3. Codex correctly detects the fenced block as Java (the Java language label is shown).
  4. Observe that keywords, types, strings, methods, etc. are all rendered nearly the same white/gray color instead of normal syntax colors.
  5. Compare with code in the normal VS Code editor: editor syntax highlighting works correctly.
Expected behavior

Codex chat code blocks should have syntax highlighting according to the detected language (for example, public, class, strings, types, and methods should receive differentiated token colors).

Actual behavior

The language is detected correctly, but the code inside the Codex chat code block is essentially monochrome.

Environment
  • OS: Windows
  • VS Code: latest version as of 2026-08-30
  • Codex VS Code extension: latest version as of 2026-08-30
  • Reproduced with Java code blocks
  • Regular editor syntax highlighting: working
  • Codex chat syntax highlighting: broken
Notes

This looks like a Codex webview / fenced-code syntax-highlighting regression. The issue is especially visible when comparing the Codex chat panel side-by-side with the editor: the editor has full token coloring while the Codex code block does not.

I can provide a screenshot showing the side-by-side behavior if needed.

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

Reproduce the issue in the Codex VS Code chat panel with a fenced Java code block, then inspect the extension's webview and fenced-code rendering path. Compare its language detection and highlighting behavior with the normal editor; done means Java keywords, types, strings, and methods render with differentiated syntax colors in chat.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.