Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.334 ·

SDK errors now name four more causes, including prompt too long

SDK results gain four typed error causes, and prompts too large for the model are now reported as prompt_too_long

Under the hood Improvements
JSON All of v2.1.334
Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SDKArea: what it touches
ImprovementsKind: in v2.1.334,
ImprovementsSection of the release

Unclear Only prompt_too_long is known to be reported; when the other three labels are actually sent is not stated.

What

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.

Why

Programs built on Claude Code can react to these causes directly instead of reading the error message text.

How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtOnly `prompt_too_long` is known to be reported; when the other three labels are actually sent is not stated.

See this entry in the whole of v2.1.334 →

Feedback