TUI: allow distinct styling/colors for user and assistant messages
Open 💬 9 comments Opened Apr 15, 2026 by M0DR1SH
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
Windows 11 - PowerShell 7.6.0 - Codex CLI in terminal mode
What feature would you like to see?
In Codex CLI, user prompts and assistant responses are currently rendered with very little visual distinction in the
main conversation flow.
At the moment, this makes long sessions harder to scan, especially when looking back through a discussion to find a
previous user instruction.
Additional information
### Current behavior
- User and assistant messages appear with nearly the same color/styling
- The only distinction is a very small prefix marker
- Theme settings seem to affect diff blocks, but not the main user/assistant message styling
- Changing the terminal color scheme does not solve the issue if Codex renders both roles similarly
### Expected behavior
It would be helpful to have stronger visual separation between:
- user messages
- assistant messages
### Possible solutions
Any of the following would help:
- distinct colors for user vs assistant messages
- configurable role-based styling in the TUI theme
- stronger prefixes or labels for each role
- optional background contrast or border styling per role
### Why this matters
In long conversations, readability and navigation degrade quickly when both sides of the conversation look almost
identical. Better role separation would make the TUI much easier to use for iterative work.
9 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’m seeing the same problem specifically in dark mode on Codex CLI.
In long transcript-heavy sessions, user prompts and assistant responses are still too visually similar in the main conversation flow. The tiny prefix marker is not enough to make prior user instructions easy to scan for.
A few clarifications from my setup and testing:
From a usability standpoint, even a minimal improvement would help a lot:
I looked through related issues/PRs and found fixes for light-mode user backgrounds and other contrast issues, but I haven’t found a merged fix that fully addresses dark-mode user vs assistant separation in the main transcript.
I dug into this locally and implemented a small focused version of the change in a fork.
What I changed:
codex-rs/tui/src/style.rsdefault_bg()is unavailable instead of falling back toStyle::default()UserHistoryCellincodex-rs/tui/src/history_cell.rsto render a clearerUser ›prefix instead of the dim single-chevron markerValidated locally with:
cargo test -p codex-tui missing_terminal_bg_uses_explicit_fallback_panel -- --nocapturecargo test -p codex-tui user_history_cell_wraps_and_prefixes_each_line_snapshot -- --nocaptureI also pushed the branch to my fork here:
LEON-gittech/codex:fix/user-message-contrast-codex-devI noticed
docs/contributing.mdsays external PRs are invitation-only, so I’m not going to open an unsolicited PR. But if the Codex team thinks this narrow approach is aligned with the intended solution, I’d be happy to submit the PR by invitation.We ran into the same readability problem and implemented a local fix that addresses most of the points raised here without adding full theme configurability yet:
What we changed in "Improve user message contrast in the TUI transcript" ():
Trade-offs:
Would the maintainers be open to a PR that upstreams these specific contrast improvements as an interim step before a full theming system?
@LEON-gittech, I'd be interested in seeing a screen shot.
<img width="1426" height="606" alt="Image" src="https://github.com/user-attachments/assets/723a40f3-a2c0-4318-8094-faf5588f8b32" />
Here is a screenshot from a typical Zellij session.
Environment:
0.43.10.124.0The screenshot shows two related readability issues:
<img width="1129" height="402" alt="Image" src="https://github.com/user-attachments/assets/dd079881-58b0-4c28-9e3d-16d2a0ed390e" />
This is the version after my fix.
have they accept this PR?
+1 for making user/assistant transcript styling configurable in the CLI TUI.
Use case: long Codex CLI sessions on Windows Terminal / WSL Ubuntu profile. The current gray user-message block is helpful, but it is still not visually distinct enough in dense transcript-heavy sessions. It would be much easier to scan if users could configure role-based styling, for example:
Terminal selection color can be configured separately in Windows Terminal, but transcript user-message blocks are rendered by Codex itself, so terminal profile settings cannot solve this.
A minimal version would already help: stronger user-message background contrast, a configurable user-message accent/border, or an explicit role label/prefix that survives dark terminal themes.