Skip to content

feat(notice): a session wall is not a weekly wall - #38

Merged
lroolle merged 2 commits into
mainfrom
feat/session-limit-clarity
Sep 2, 2026
Merged

feat(notice): a session wall is not a weekly wall#38
lroolle merged 2 commits into
mainfrom
feat/session-limit-clarity

Conversation

@lroolle

@lroolle lroolle commented Sep 2, 2026

Copy link
Copy Markdown
Member

What & why:

Claude Code 2.1.258 can offer /low-priority when the shorter 5h session window binds. The current line renders that state as 5h[101%] while a higher-ranked weekly-surplus notice can say + 47% unused, so an interrupted session reads like an invitation to spend.

This PR makes the state explicit and provenance-gated:

  • render any 5h value at or above 100 as 5h[cap@04:00] and suppress the meaningless +N bump at the wall
  • pin the capped 5h wall above weekly opportunity
  • name /low-priority only when this session transcript carries a matching quotaLimits.lowPriorityOffer for the current reset
  • distinguish offered from active through the transcript local-command result
  • never guess the separate lower-priority allowance, which is absent from statusline stdin and /api/oauth/usage
  • keep a fresh sibling-account escape above the lower-priority path

Real 2.1.258 offer and active transcripts were replayed against the renderer. The active frame reads + lower priority · 47% of 7d left; the offer frame reads ! 5h capped · /low-priority uses 7d. No raw transcript data enters fixtures or docs.

Checklist:

  • make check passes: 491 tests
  • New function added to the awk whitelist in t/helpers.bash
  • No real tokens, session IDs, emails, account names, or home paths in fixtures/docs
  • bash -n statusline.sh install.sh and git diff --check pass

Sibling implementation: thevibeworks/ccpace#2 states the 5h wall and weekly headroom from the account-level API, without claiming session-only eligibility.

Cache follow-up: the capped path now has one tested TTL rule in both fetch gates. stdin keeps 5h/7d live; scoped and extra-usage fields remain on a finite 120 s API cadence instead of freezing to reset.

@lroolle
lroolle merged commit 51ecf17 into main Sep 2, 2026
1 check passed
@lroolle
lroolle deleted the feat/session-limit-clarity branch September 2, 2026 08:40
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