fix: preserve statusline high-water across stale sessions#47
Merged
Conversation
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 |
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
pushed a commit
that referenced
this pull request
May 6, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.
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.
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!