Unclear Only prompt_too_long is known to be reported; when the other three labels are actually sent is not stated.
The SDK lets other programs run Claude Code and read its results. When an API request fails, the result can carry a typed error kind, a fixed label for the cause. Four labels were added:
prompt_too_long: the request does not fit the model's context window.request_too_large: the request is too large.no_credential: Claude Code had no credential to send.token_revoked: the API refused the request because the sign-in's OAuth token was revoked.
A 400 or 413 invalid-request error now carries prompt_too_long, where before it had no typed kind. Each cause also maps to a suggested fix: no_credential and token_revoked point to fixing your setup, and prompt_too_long points to making room.
Programs built on Claude Code can react to these causes directly instead of reading the error message text.
Only `prompt_too_long` is known to be reported; when the other three labels are actually sent is not stated.