Skip to content

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

Closed as duplicate

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.

Activity

  1. added
    enhancement
    CLI
    TUI
    config
    on Apr 29, 2026
  2. github-actions commented on Apr 29, 2026

    @github-actions
    Contributor
  3. etraut-openai commented on Apr 29, 2026

    @etraut-openai
    Contributor

    Please upvote #17827.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLITUIconfigenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions