codex - 💡(How to fix) Fix ANSI background colors are dropped in command output rendering [1 participants]

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…
GitHub stats
openai/codex#22056Fetched 2026-05-11 03:20:00
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Timeline (top)
labeled ×3unlabeled ×1

Code Example

printf '\033[30;42mblack on green background\033[0m\n'
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.130.0

What subscription do you have?

pro

Which model were you using?

gpt-5.5

What platform is your computer?

windows running a debian docker

What terminal emulator and version are you using (if applicable)?

xterm-256color

What issue are you seeing?

Codex CLI renders foreground ANSI colors in shell command output, but appears to drop ANSI background color attributes.

This is not limited to git diff. Raw ANSI background sequences also lose their background styling when shown through Codex command output.

Repro

Run through Codex command execution:

printf '\033[30;42mblack on green background\033[0m\n'

Expected

The text should render with a green background, matching direct terminal behavior.

Actual

Foreground/style rendering works, but the background color is not displayed.

Notes

The same command run directly in the terminal renders the background correctly, so the terminal itself supports it.

Codex’s own UI chrome appears capable of rendering background/shadow surfaces for prompt/response blocks, so this seems specific to the captured shell/tool output renderer or ANSI parsing path.

Observed locally:

codex-cli 0.130.0 TERM=xterm-256color COLORTERM=truecolor

What steps can reproduce the bug?

Just using Codex in the terminal, however using vs-code build in terminal would render the background colors automatically.

What is the expected behavior?

Codex cli uses background colors to visually help, those seem to be misfunctioning when using Windows's cmd conecting to a debian docker where codex is running.

Additional information

I try to get codex on the host and codex on the docker to fix this, both where unable to give an answer. This issue was suggested to be open by my Codex session when it found it self unable to fix it.

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…

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 ANSI background colors are dropped in command output rendering [1 participants]