docs: clarify 1M context window compatibility

This commit is contained in:
Jarrod Watts
2026-03-14 11:38:48 +11:00
parent 4dae28bd3f
commit ed00948cbf
3 changed files with 7 additions and 4 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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;