Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.232 Home All releases olderv2.1.231 v2.1.233newer
Claude Code v2.1.232

/context returns structured usage, exposed to the SDK as context_usage

Use it now
Useful3 Signal3
Context Notable

SDK consumers get /context numbers as context_usage on the assistant message, including an over-limit block.

/contextcontext_usage
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 contextUsage nor context_usage appeared 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.

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.232 →