openai / openai/codex

Allow compact formatting for rate-limit status-line items

Open
#41,739 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

CLI config enhancement rate-limits TUI
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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

  • #24080 requests reset-time status-line tokens, but does not provide a way to remove the built-in labels.
  • #21003 requests reset countdowns in the existing labelled output.
  • #17827 requests arbitrary command-backed status-line rendering; this request is a narrower built-in formatting option that would not require executing an external command.
  • #24274 added explicit left wording to make the default unambiguous. This request preserves that default and makes compact output opt-in.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the built-in weekly-limit and five-hour-limit status-line rendering and the configuration path for string-based items. Trace how the rate-limit snapshot exposes remaining percentage and reset metadata, then check existing status-line tests. Done means opt-in compact formatting works in local time while preserving default output, handling missing reset data, and using one snapshot for both values.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.