diff --git a/CHANGELOG.md b/CHANGELOG.md index cfe7742..f97f3e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to Claude HUD will be documented in this file. ### Changed - Update the fallback autocompact buffer estimate from `22.5%` (`45k/200k`) to `16.5%` (`33k/200k`) to match current Claude Code `/context` output. - Clarify in code comments that the fallback buffer is empirical and may change independently of documented Claude Code releases. +- Clarify that context percentages and token displays scale with Claude Code's reported context window size, including newer 1M-context sessions. - Text-only usage display now shows the 7-day reset countdown when applicable. - Rate-limited usage refreshes now keep the last successful values visible while marking the HUD as syncing. diff --git a/README.md b/README.md index a030160..dfff4bf 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ Claude Code → stdin JSON → claude-hud → stdout → displayed in your termi **Key features:** - Native token data from Claude Code (not estimated) +- Scales with Claude Code's reported context window size, including newer 1M-context sessions - Parses the transcript for tool/agent activity - Updates every ~300ms diff --git a/src/constants.ts b/src/constants.ts index e406285..9065128 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,9 +1,10 @@ /** * Autocompact buffer percentage. * - * NOTE: This value (16.5% = 33k/200k) is empirically derived from current - * Claude Code `/context` output. It is NOT officially documented by Anthropic - * and may change in future Claude Code versions. If users report mismatches, - * this value may need adjustment. + * NOTE: This value is applied as a percentage of Claude Code's reported + * context window size. The `33k/200k` example is just the 200k-window case. + * It is empirically derived from current Claude Code `/context` output, is + * not officially documented by Anthropic, and may need adjustment if users + * report mismatches in future Claude Code versions. */ export const AUTOCOMPACT_BUFFER_PERCENT = 0.165;