Customize your status line changedstatusline
Nearest release: v2.1.330, published 4 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 20 Nov 2026 23:28 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 20 Nov 2026 23:37 UTC.
Upstream edited
Recorded here
Lines+2added
Lines−4removed
From line
342
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits44to this page, all time
The whole hunk
from line 342, old and new numbered
/
from line 342
342342>
343343> **Fields that may be `null`**:
344344>
345> * `context_window.current_usage`: `null` before the first API call in a session, and again after `/compact` until the next API call repopulates it
345> * `context_window.current_usage`: see [context window fields](#context-window-fields)
346346> * `context_window.used_percentage`, `context_window.remaining_percentage`: may be `null` early in the session
347347>
348348> Handle missing fields with conditional access and null values with fallback defaults in your scripts.
from line 352
352352The `context_window` object describes the live context window from the most recent API response.
353353
354354* **Combined totals** (`total_input_tokens`, `total_output_tokens`): tokens currently in the context window. `total_input_tokens` is the sum of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`; `total_output_tokens` is the output tokens from the most recent response. Both are `0` before the first API response.
355* **Per-component usage** (`current_usage`): the same token counts broken out by category. Use this when you need cache hits separate from fresh input.
355* **Per-component usage** (`current_usage`): the same token counts broken out by category. Use this when you need cache hits separate from fresh input. The object is `null` before the first API call in a session, and `null` or all zeros after `/compact` until the next API call. Treat both as empty.
356356
357357The `current_usage` object contains:
358358
from line 366
366366The `used_percentage` field is calculated from input tokens only: `input_tokens + cache_creation_input_tokens + cache_read_input_tokens`. It does not include `output_tokens`.
367367
368368If you calculate context percentage manually from `current_usage`, use the same input-only formula to match `used_percentage`.
369
370The `current_usage` object is `null` before the first API call in a session, and again immediately after `/compact` until the next API call repopulates it.
371369
372370### Spend limit fields
373371
No line in this hunk matches that.