You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: allow distinct styling/colors for user and assistant messages #17879
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.
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:
this is in dark mode, not a light-theme issue
changing the terminal color scheme alone does not solve it if Codex keeps both roles styled too similarly
the problem is in the main transcript, not just diff views, subagent labels, or the composer
From a usability standpoint, even a minimal improvement would help a lot:
stronger user-message background contrast
distinct role labels or prefixes
optional role-based styling in the TUI theme
any non-color structural cue (border/left rule/badge) so the distinction survives across terminal themes
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 noticed docs/contributing.md says 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" ():
Stronger prefix / label — changed the user-message prefix from a tiny dim to explicit in bold cyan. This makes user messages immediately scannable.
Background contrast fallback — when terminal background detection fails (common under terminal multiplexers like Zellij), we now fall back to background instead of no background at all ().
Darker alpha blend — increased the dark-terminal alpha from to so the subtle background tint is actually visible on dark themes.
Consistent padding — aligned the assistant-message indentation to match the new user prefix width so the transcript stays visually balanced.
Trade-offs:
No new theme/config keys added (keeps the change small).
The cyan prefix is hard-coded; users who want full configurability would still need the "configurable role-based styling" feature mentioned in this issue.
Would the maintainers be open to a PR that upstreams these specific contrast improvements as an interim step before a full theming system?
+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.
Closing as overlapping with #8782, which tracks better separation of user input and Codex replies. Your Windows/WSL styling suggestions remain useful linked evidence; broader theme configuration is also tracked in #21130.
Activity
github-actions commentedon Apr 15, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
LEON-gittech commentedon Apr 16, 2026
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.
LEON-gittech commentedon Apr 16, 2026
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.LEON-gittech commentedon Apr 27, 2026
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?
etraut-openai commentedon Apr 27, 2026
@LEON-gittech, I'd be interested in seeing a screen shot.
LEON-gittech commentedon Apr 27, 2026
Here is a screenshot from a typical Zellij session.
Environment:
0.43.10.124.0The screenshot shows two related readability issues:
LEON-gittech commentedon Apr 27, 2026
This is the version after my fix.
bowuL commentedon Jun 9, 2026
have they accept this PR?
simfor99 commentedon Jul 2, 2026
+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.
etraut-openai commentedon Oct 13, 2026
(response from codex)
Closing as overlapping with #8782, which tracks better separation of user input and Codex replies. Your Windows/WSL styling suggestions remain useful linked evidence; broader theme configuration is also tracked in #21130.