Skip to content

Releases: Astro-Han/claude-pace

v0.9.2

Choose a tag to compare

@Astro-Han Astro-Han released this 16 Jun 03:57
  • Fix the auto-compact bar briefly showing the model's full window (e.g. 0% 1M) at the very start of a session. Claude Code sends context_window.total_input_tokens as 0 on a fresh session's first frame, and v0.9.1 only recomputed against the auto-compact window when that value was > 0 — so the bar (and its 1M label) fell back to the full window until the first API response landed, the exact 1M flash issue #15 set out to remove. The recompute now fires whenever the field is present, including a genuine 0, and falls back to the full window only when Claude Code omits the field entirely (older CC that predates total_input_tokens). jq now emits a -1 sentinel for the missing field so a real 0 (fresh-session first frame) and an absent field no longer collapse to the same value (follow-up to #15)
  • Add regression coverage for the present-zero first frame measuring against the compact window, plus an explicit guard that a missing field never relabels to the compact window

v0.9.1

Choose a tag to compare

@Astro-Han Astro-Han released this 25 May 16:18

Track context against CLAUDE_CODE_AUTO_COMPACT_WINDOW.

Since Claude Code 2.1.117 the statusline's context_window.context_window_size is the model's full window (e.g. 1M for Opus 4.7) and used_percentage is measured against it. On a context capped by CLAUDE_CODE_AUTO_COMPACT_WINDOW (e.g. 400K) the bar filled against 1M and looked nearly empty right as auto-compaction was about to fire.

When the env var is set and context_window.total_input_tokens (CC 2.1.132+) is available, the bar now measures used tokens against the auto-compact window and relabels the size (e.g. 15% 400K), matching the desktop app's context indicator. Clamped to the real window, capped at 100%, and falls back to full-window behavior when the env var is unset or token data is missing (early session). Line 1 keeps the model's full-window label (e.g. (1M)) because that reflects the model's capability, not the active budget.

Closes #15

v0.9.0

Choose a tag to compare

@Astro-Han Astro-Han released this 20 May 14:27

Breaking change

Removes the last-known quota cache fallback. When stdin rate_limits is absent, claude-pace now shows -- for 5h/7d quota and the session cost when available, instead of replaying a cached snapshot from a previous run.

Cross-provider contamination reported by @kvdb in #14 surfaced the underlying identity gap: stdin carries no provider/account identifier, so a cached account-level snapshot cannot be proven to belong to the current session. Multi-provider users (e.g. Claude Max + Microsoft Foundry) saw one account's quota leak into the other. Showing -- is an honest failure mode; replaying a wrong-account snapshot is a silent wrong answer.

The per-project cache key proposed in PR #14 would only paper over the most common collision pattern without restoring identity, so the fallback is removed entirely instead of re-keyed.

See docs/decisions/2026-05-20-quota-cache-removal.md for the full reasoning and the conditions under which a cache could be reintroduced.

What you need to know

  • Claude Code >=2.1.80 provides rate_limits in statusline stdin — the common case is unaffected
  • Sessions where rate_limits is absent now show -- for 5h/7d quota and the session cost when present
  • Existing ~/.cache/claude-pace/claude-sl-quota* files from v0.8.x are now orphans, ignored by claude-pace, and safe to delete manually

Diffstat

  • Drops ~250 lines covering quota cache write/read, snapshot validation, symlink and unreadable-file hardening, and expired-reset guards
  • Tests: Test 19-33 replaced with two tighter behavior contracts (absent rate_limits → placeholders + session cost without consulting any cache; legacy orphan quota cache files are ignored)

v0.8.6

Choose a tag to compare

@Astro-Han Astro-Han released this 01 May 13:10

Fixes

  • Windows Git Bash compatibility: replace jq --slurpfile + process substitution with --argjson. /proc/<pid>/fd/N is unavailable on Windows, which previously caused MODEL and DIR to render blank. Thanks @capraCoder in #13.
  • Settings validation: validate ~/.claude/settings.json with jq -e . before passing to --argjson, falling back to {} for empty, whitespace-only, or malformed JSON so settings parsing failures stay localized to effort level.

Verification

98 regression assertions pass on Linux/macOS. Windows Git Bash + jq 1.8.1 verified by the PR author.

Full diff: v0.8.5...v0.8.6

v0.8.5

Choose a tag to compare

@Astro-Han Astro-Han released this 27 Apr 07:49
  • Show the effort level as a word (low / medium / high / xhigh / max) on line 1 instead of a glyph, for readability (#12)
  • Bump model-name truncation budget on line 1 from 22 to 28 chars to fit the longest word (medium) without clipping
  • Update regression tests to assert effort word + pipe alignment for all five levels, and pin the new 28-char truncation budget so a Sonnet 4.6 (200K) medium line stays unclipped

v0.8.4

Choose a tag to compare

@Astro-Han Astro-Han released this 24 Apr 03:31
  • Read effort.level from stdin when available (Claude Code 2.1.119+), falling back to ~/.claude/settings.json effortLevel on older versions
  • Add regression coverage for stdin effort levels and stdin-over-settings precedence (thanks @lifebugz in #11)

v0.8.3

Choose a tag to compare

@Astro-Han Astro-Han released this 20 Apr 07:23

What's Changed

  • Release 0.8.3: xhigh effort level + icon family redesign by @Astro-Han in #10

Full Changelog: v0.8.2...v0.8.3

v0.8.2

Choose a tag to compare

@Astro-Han Astro-Han released this 13 Apr 07:49

0.8.2

  • Avoid rewriting the quota cache when the live stdin snapshot is unchanged
  • Keep quota cache hardening intact for symlinked or unreadable cache files while preserving atomic rewrite fallback
  • Simplify test helpers and add regression coverage for symlinked and unreadable quota cache files on the live path

v0.8.1

Choose a tag to compare

@Astro-Han Astro-Han released this 13 Apr 04:42

Changes

  • Reuse the last known stdin quota snapshot when rate_limits is absent, as long as both cached reset times are still in the future
  • Ignore invalid, expired, or partial-live quota snapshots instead of overwriting a previously good cache

Verification

  • bash test.sh

v0.8.0

Choose a tag to compare

@Astro-Han Astro-Han released this 12 Apr 16:20
  • Remove the Anthropic Usage API fallback, quota tracking now reads only from stdin rate_limits
  • Quota tracking now requires Claude Code 2.1.80+; when rate_limits is absent, claude-pace shows -- for quota and may still show session cost