Skip to content

fix: preserve statusline high-water across stale sessions#47

Merged
tw93 merged 1 commit into
tw93:mainfrom
Nagi-ovo:main
May 6, 2026
Merged

fix: preserve statusline high-water across stale sessions#47
tw93 merged 1 commit into
tw93:mainfrom
Nagi-ovo:main

Conversation

@Nagi-ovo

@Nagi-ovo Nagi-ovo commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a statusline rate-limit display issue where stale Claude Code sessions can report outdated lower usage and cause the active session’s 5h/7d quota display to flicker or regress.

Changes

  1. Added per-window high-water tracking for 5h and 7d rate limits, so lower stale-session values do not overwrite the highest observed usage in the current window.

  2. Kept reset handling window-aware: expired high-water values are ignored, and mismatched reset windows are rejected to avoid 7d data being applied to 5h.

  3. Added a small lock around high-water cache writes and smoke coverage for stale low-percent sessions.

Verification

Tested locally for about one week; the issue no longer reproduces.

No breaking changes and CI passes!

Screenshot 2026-05-05 at 22 47 44

@tw93

tw93 commented May 6, 2026

Copy link
Copy Markdown
Owner

@Nagi-ovo Thanks for the deep investigation and the week of stability evidence. The window-aware reset handling and the directory-lock around high-water writes are exactly the right shape.

Merging this for v3.20.0. Bonus: it also clears the SC2317 and SC2015 shellcheck failures introduced on main last night, so this PR doubles as a CI fix.

Will land via npx skills update -g -y (or /plugin update waza@waza) once v3.20.0 is published.

@tw93 tw93 merged commit 7ff07c4 into tw93:main May 6, 2026
1 check passed
tw93 added a commit that referenced this pull request May 6, 2026
apt-installed shellcheck on ubuntu-latest reports SC2317/SC2015 that
brew shellcheck 0.11.0 ignores, which silently broke main CI on
b89a98a until PR #47 landed. Download the v0.10.0 binary directly with
a sha256 check so CI behavior is reproducible from any developer
machine and immune to future ubuntu image bumps.

Co-authored-by: Cursor <cursoragent@cursor.com>
tw93 added a commit that referenced this pull request May 6, 2026
apt-installed shellcheck on ubuntu-latest reports SC2317/SC2015 that
brew shellcheck 0.11.0 ignores, which silently broke main CI on
db15d6f until PR #47 landed. Download the v0.10.0 binary directly with
a sha256 check so CI behavior is reproducible from any developer
machine and immune to future ubuntu image bumps.
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.

2 participants