What
Running /context now produces machine-readable numbers next to the rendered table, and SDK consumers receive them on the assistant message as context_usage. Fields are model, total_tokens, raw_max_tokens, percentage, categories, and an over_limit block containing tokens_over.
Details
- The payload is attached to the system message that carries local command output.
- When that message is converted for the SDK stream, the field is emitted only if present, so messages without usage data are unchanged.
- Neither
contextUsagenorcontext_usageappeared in v2.1.231.
Evidence
...(n !== void 0 && { context_usage: n }),
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Names in the bundle/contextcontext_usage
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on whats-new-fable-5-1 touched a line naming /context after this was published.
To keep thinking valid across a long session, treat the conversation as append-only. Add instructions with a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) ([turn-s…models/fable-5-1/whats-new-fable-5-1 see the edit
Confirmed since
Anthropic's documentation has since written up /context, on How Claude Code uses prompt caching.
[Compaction](/docs/en/context-window#what-survives-compaction) replaces your message history with a summary. By design, this invalidates the conversation layer, since the next request has a new, shorter history that doesn't share a prefix …prompt-caching see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up /context, on How Claude Code uses prompt caching.