Skip to content

Custom command-backed TUI status line or colored status banner #20244

@gregoryrd

Description

@gregoryrd

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayconfigIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions