codex - 💡(How to fix) Fix Custom command-backed TUI status line or colored status banner [2 comments, 3 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#20244Fetched 2026-04-30 06:31:12
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1

Root Cause

Teams often need a persistent visual distinction between different model routes, providers, environments, projects, or local workflow states. The built-in model-with-reasoning item shows the model name, but it does not let teams map model/provider/runtime state to custom labels, color, or warning emphasis.

Hooks can emit messages during events, but they are not a persistent status indicator. External tmux/zellij status bars can work around this, but they are outside Codex's supported TUI experience and require extra terminal-specific setup.

Code Example

[tui]
status_line = [
  { type = "command", command = "~/.codex/bin/model-status", ansi = true, timeout_ms = 200 },
  "model-with-reasoning",
  "context-remaining",
  "current-dir"
]

---

[tui.banner]
position = "above-status-line" # or below-status-line
command = "~/.codex/bin/model-status"
ansi = true
timeout_ms = 200
refresh = ["startup", "model-change", "turn-start"]

---

{
  "model": "gpt-5.4",
  "model_provider": "openai",
  "cwd": "/repo",
  "session_id": "..."
}
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

CLI / TUI mode

What feature would you like to see?

Please add a supported way to show custom text, colors, and conditional status information in the Codex TUI status area.

Today, [tui].status_line supports a fixed list of built-in item IDs such as model-with-reasoning, current-dir, git-branch, and context usage. That is useful, but it does not support arbitrary static text, command-backed output, conditional formatting, ANSI colors, or an additional persistent line above/below the built-in status line.

A concrete example: a team may want every Codex session to show a high-visibility model indicator where one selected model appears in red and other models appear in green, or where a custom label is shown based on the active model/provider.

Possible designs

Option 1: command-backed status-line item:

[tui]
status_line = [
  { type = "command", command = "~/.codex/bin/model-status", ansi = true, timeout_ms = 200 },
  "model-with-reasoning",
  "context-remaining",
  "current-dir"
]

Option 2: separate persistent banner line:

[tui.banner]
position = "above-status-line" # or below-status-line
command = "~/.codex/bin/model-status"
ansi = true
timeout_ms = 200
refresh = ["startup", "model-change", "turn-start"]

The command should receive stable JSON on stdin, similar to hooks, including fields such as:

{
  "model": "gpt-5.4",
  "model_provider": "openai",
  "cwd": "/repo",
  "session_id": "..."
}

It should be acceptable for the command to output either ANSI-formatted text or structured styled JSON. Multi-line output would also be useful, though a single-line command-backed item would already solve many customization use cases.

Why this matters

Teams often need a persistent visual distinction between different model routes, providers, environments, projects, or local workflow states. The built-in model-with-reasoning item shows the model name, but it does not let teams map model/provider/runtime state to custom labels, color, or warning emphasis.

Hooks can emit messages during events, but they are not a persistent status indicator. External tmux/zellij status bars can work around this, but they are outside Codex's supported TUI experience and require extra terminal-specific setup.

Related issues

Related but not identical:

  • #2926: Allow customizing the status line
  • #10233: Non-interactive Codex status / JSON replacement for /status
  • #13660: Add fast mode status to the statusline
  • #15497: Hook status message behavior in TUI

This request is specifically for supported custom/command-backed TUI status output or a persistent custom banner line with color support.

extent analysis

TL;DR

Implementing a command-backed status-line item or a separate persistent banner line with custom text, colors, and conditional status information can address the requirement.

Guidance

  • Consider using the proposed command type in the status_line configuration to execute a custom command that outputs the desired status information.
  • Evaluate the feasibility of using a separate tui.banner configuration to display a persistent custom banner line above or below the built-in status line.
  • Investigate the possibility of using ANSI-formatted text or structured styled JSON output from the custom command to achieve the desired visualization.
  • Review the related issues (#2926, #10233, #13660, #15497) to ensure that the proposed solution does not overlap with existing functionality or ongoing development.

Example

[tui]
status_line = [
  { type = "command", command = "~/.codex/bin/model-status", ansi = true, timeout_ms = 200 },
  "model-with-reasoning",
  "context-remaining",
  "current-dir"
]

Notes

The proposed solution relies on the custom command receiving stable JSON input and producing the desired output. The command's implementation details are not specified, and its development is left to the user.

Recommendation

Apply workaround: Implement a command-backed status-line item or a separate persistent banner line, as these approaches seem to be the most promising solutions based on the provided information.

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