{"version":"2.1.232","anchor":"context-returns-structured-usage-exposed-to-the-sdk-as-conte","canonical_anchor":"context-returns-structured-usage-exposed-to-the-sdk-as-conte","heading":"\/context returns structured usage, exposed to the SDK as context_usage","tier":"use","area":"Context","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.232\/e\/context-returns-structured-usage-exposed-to-the-sdk-as-conte","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.232","markdown":"### \/context returns structured usage, exposed to the SDK as `context_usage`\n\nSDK consumers get \/context numbers as `context_usage` on the assistant message, including an over-limit block.\n\n**What**\n\nRunning `\/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`.\n\n**Details**\n\n- The payload is attached to the system message that carries local command output.\n- When that message is converted for the SDK stream, the field is emitted only if present, so messages without usage data are unchanged.\n- Neither `contextUsage` nor `context_usage` appeared in v2.1.231.\n\n**Evidence**\n\n`...(n !== void 0 && { context_usage: n }),`\n\n- Area: Context\n- Names: `\/context`, `context_usage`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5"}