Skip to content

Allow compact formatting for rate-limit status-line items #41739

Open

Description

@Eiji-Kudo

Summary

Please allow users to format built-in rate-limit status-line items compactly, including the remaining percentage and the absolute reset time without mandatory labels.

For example, the current configuration:

[tui]
status_line = ["weekly-limit"]

renders:

weekly 44% left

For a dense status line, I would prefer an opt-in format such as:

44% · Sep 6 03:00

The percentage should mean remaining capacity, and the reset timestamp should use the user's local timezone.

Motivation

The mandatory weekly and left text is useful as an unambiguous default, but it consumes space when the user has explicitly selected and positioned the weekly item. Showing the reset deadline is more actionable than repeating those labels: it tells the user whether the remaining allowance must last for hours or several days.

This matters when the status line also contains the model, context remaining, Git branch, pull request, and working directory.

Proposed direction

Please keep the existing weekly-limit and five-hour-limit output unchanged by default, whilst adding an opt-in compact/custom format. Possible designs include:

  1. A format template on a built-in item:
status_line = [
  { item = "weekly-limit", format = "{remaining_percent}% · {resets_at:%b %-d %H:%M}" },
]
  1. A compact built-in item that renders percentage and reset time from the same rate-limit snapshot.

The exact configuration shape is flexible. A single snapshot is preferable so that the percentage and reset time cannot briefly become inconsistent during a reset.

Acceptance criteria

  • Existing string-based status-line items retain their current output.
  • Users can opt out of the built-in weekly / 5h prefix and left suffix.
  • The same item can show remaining percentage and an absolute reset timestamp.
  • The reset timestamp is displayed in the user's local timezone.
  • Missing reset metadata is handled without displaying a misleading deadline.
  • Percentage and reset time are rendered from the same rate-limit snapshot.

Environment

  • Codex CLI 0.151.0
  • macOS
  • ChatGPT subscription authentication

Related issues

Activity

  1. added
    enhancement
    CLI
    TUI
    rate-limits
    config
    on Aug 30, 2026
  2. stan7678 commented on Aug 31, 2026

    @stan7678

    I tested this use case locally with Codex CLI 0.151.0.

    A compact status line like this proved much more useful during long-running tasks:

    5.6 sol medium · 5h 98% ↻ 4h 59m · week 37% ↻ 5d 20h · ctx 71%

    A local implementation passed all 87 relevant status-line tests. The most valuable parts are:

    • remaining percentage and reset countdown shown together;
    • short labels that fit alongside model and context information;
    • local-time countdowns that are immediately understandable;
    • keeping the current verbose format as the default and making compact formatting opt-in.

    Official support would also eliminate the need to rebuild the entire Codex binary after every update just to
    preserve this small UI customization.

    I would especially appreciate countdown formatting as an option alongside the absolute reset timestamp proposed
    here.

  3. adrijshikhar commented on Oct 1, 2026

    @adrijshikhar

    For anyone looking for compact rate-limit formatting without having to maintain a local build after every Codex update, cxstatusline supports this out of the box.

    It provides compact quota tokens with live countdowns (5h 98% ↻ 4h 59m / week 37% ↻ 5d 20h), short custom labels, and verified prebuilts matching stable Codex releases (with 1-command revert via cxstatusline revert).

    👉 Web Playground: https://cxstatusline.adrijshikhar.dev
    📦 GitHub Repo: https://github.com/adrijshikhar/cxstatusline

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

    CLITUIconfigenhancementrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions