[DOCS] Agent SDK missing `SDKRateLimitInfo` and `SDKRateLimitEvent` type documentation

Resolved 💬 2 comments Opened Feb 17, 2026 by coygeek Closed Mar 8, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://platform.claude.com/docs/en/agent-sdk/typescript

Section/Topic

SDK type reference / event types

Current Documentation

The Agent SDK TypeScript documentation covers streaming events and cost tracking but does not mention rate limit info or rate limit events.

The API rate limits page (https://platform.claude.com/docs/en/api/rate-limits) documents HTTP response headers (anthropic-ratelimit-*) and error handling for 429 responses. The SDK pages document RateLimitError exception classes for catching HTTP 429 errors. Neither documents structured types for proactive rate limit status monitoring.

What's Wrong or Missing?

Claude Code v2.1.45 added SDKRateLimitInfo and SDKRateLimitEvent types to the SDK, enabling consumers to receive rate limit status updates including utilization, reset times, and overage information. These types are entirely undocumented:

  • SDKRateLimitInfo — A type providing rate limit status (utilization, reset times, overage). Not documented anywhere.
  • SDKRateLimitEvent — An event type for receiving rate limit status updates. Not documented anywhere.

The current docs only cover reactive rate limit handling (catching RateLimitError after hitting a 429). The new types enable proactive monitoring — knowing your rate limit utilization before you hit a limit — which is a different and valuable capability for SDK consumers.

Suggested Improvement

Add documentation for these types in the Agent SDK TypeScript reference. Suggested content:

Rate limit monitoring

Add a section covering:

  1. SDKRateLimitInfo — Type definition with fields for utilization percentage, reset timestamps, and overage details
  2. SDKRateLimitEvent — Event type and how to subscribe to rate limit status updates
  3. A usage example showing how to monitor rate limit utilization proactively

This could be added as a subsection in the existing Agent SDK TypeScript page, or as part of the cost tracking documentation (since rate limit monitoring is related to resource management).

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://platform.claude.com/docs/en/agent-sdk/typescript | Primary SDK reference — no mention of rate limit types |
| https://platform.claude.com/docs/en/agent-sdk/streaming-output | Documents StreamEvent types — does not include SDKRateLimitEvent |
| https://platform.claude.com/docs/en/agent-sdk/cost-tracking | Documents token/cost tracking — does not cover rate limit monitoring |

Total scope: 3 pages affected

Source: Changelog v2.1.45 — "Added SDKRateLimitInfo and SDKRateLimitEvent types to the SDK, enabling consumers to receive rate limit status updates including utilization, reset times, and overage information"

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗