Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Customize your status line changedstatusline

Nearest release: v2.1.336, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 3 Dec 2026 20:18 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Dec 2026 20:37 UTC.

Upstream edited
Recorded here
Lines+6added
Lines−6removed
From line 191 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits48to this page, all time

The whole hunk

from line 191, old and new numbered
/
lines
from line 191
191191| `cost.total_lines_added`, `cost.total_lines_removed` | Lines of code changed |
192192| `context_window.total_input_tokens`, `context_window.total_output_tokens` | Token counts currently in the context window, from the most recent API response. Input includes cache reads and writes |
193193| `context_window.context_window_size` | Maximum context window size in tokens |
194| `context_window.used_percentage` | Pre-calculated percentage of context window used |
195| `context_window.remaining_percentage` | Pre-calculated percentage of context window remaining |
194| `context_window.used_percentage` | Pre-calculated percentage of context used, described in [context window fields](#context-window-fields) |
195| `context_window.remaining_percentage` | `100` minus `used_percentage` |
196196| `context_window.current_usage` | Token counts from the last API call, described in [context window fields](#context-window-fields) |
197197| `exceeds_200k_tokens` | Whether the total token count (input, cache, and output tokens combined) from the most recent API response exceeds 200k. This is a fixed threshold regardless of actual context window size. |
198198| `fast_mode` | Whether [fast mode](https://code.claude.com/docs/en/fast-mode.md) is enabled for the session |
from line 375
375375 
376376For what the cache fields mean and how they're billed, see [check cache performance](https://code.claude.com/docs/en/prompt-caching.md#check-cache-performance).
377377 
378The `used_percentage` field is calculated from input tokens only: `input_tokens + cache_creation_input_tokens + cache_read_input_tokens`.
378In a local session, `used_percentage` is `total_input_tokens` as a percentage of your [auto-compact window](https://code.claude.com/docs/en/model-config.md#context-window-and-auto-compaction), or of `context_window_size` when auto-compact is off. To track usage against the model's full context window, calculate `total_input_tokens * 100 / context_window_size`. Before v2.1.336, `used_percentage` was a percentage of `context_window_size`.
379379 
380If you calculate context percentage manually from `current_usage`, use the same input-only formula to match `used_percentage`.
381 
382380### Spend limit fields
383381 
384382Behind a [Claude apps gateway with spend limits](https://code.claude.com/docs/en/claude-apps-gateway-spend-limits.md#usage-warnings-in-claude-code), the `rate_limits.spend_limit` object describes the spend limit that applies to you. It appears after the session's first API response and requires Claude Code v2.1.251 or later. Your script receives its fields on separate schedules:
from line 434
436434 
437435### Context window usage
438436 
439Display the current model and context window usage with a visual progress bar. Each script reads JSON from stdin, extracts the `used_percentage` field, and builds a 10-character bar where filled blocks (▓) represent usage:
437Display the current model and context usage with a visual progress bar.
438 
439Each script reads JSON from stdin, extracts the `used_percentage` field, and builds a 10-character bar where filled blocks (▓) represent usage:
440440 
441441![A status line showing model name and a progress bar with percentage](https://mintcdn.com/claude-code/HDAmBwgbrZVk0pOt/images/statusline-context-window-usage.png?fit=max\&auto=format\&n=HDAmBwgbrZVk0pOt\&q=85\&s=f3918a549912dc47e90f2b69e68bc847)
442442 
Feedback