ANSI background colors are dropped in command output rendering

Open 💬 0 comments Opened May 10, 2026 by savethebeesandseeds

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:

``bash
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.

View original on GitHub ↗