Skip to content

Mark the pace on agent limit meters - #11892

Open
mojek wants to merge 1 commit into
omacom:quattrofrom
mojek:agents-pace-tick
Open

mojek wants to merge 1 commit into
omacom:quattrofrom
mojek:agents-pace-tick

Conversation

@mojek

@mojek mojek commented Sep 15, 2026

Copy link
Copy Markdown

The Agents panel shows how much of each limit is used and when it resets, but not whether that usage is sustainable. 87% of a weekly window reads very differently on day one than on day six.

This adds a pace tick to each limit meter: the share of the window that has already elapsed, i.e. where usage would sit if the allowance were spent evenly until the reset. Usage to the right of the tick runs out before the reset. The reset line spells it out as well:

Resets in 3d 3h · pace 55% (+32 ahead)

  • The span comes from the existing windowSpanMs() label parsing (5-hour, 7-day, monthly, Codex 5h window). It is kept on the limit record as spanMs.
  • When the span is unknown, or the reset is further away than the parsed span allows (the misparsed (1M context) case already called out in limitWindow()), no tick is drawn and the reset line is unchanged.
  • The tick has a surface-colored halo so it stays readable over both the fill and the empty track.

Testing

  • test/shell.d/agent-usage-claude-limits-test.sh: record-shape expectations updated for spanMs, plus new cases for session and weekly pace, a fresh window, a missing reset time and a misparsed span.
  • ./test/all: the only failures are the three omarchy-pkgs checkout checks that need that repository cloned next to this one.
  • Verified in the running shell on Omarchy 4.0.3 (Claude Max and Codex windows).

🤖 Generated with Claude Code

https://claude.ai/code/session_01M2z9bzhcU7sA3PnHWoMSRL

A tick on each limit meter shows how much of the allowance an even spend
would have used by now, and the reset line spells out the pace and how far
ahead or under it usage runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M2z9bzhcU7sA3PnHWoMSRL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant