What
When the API refuses an image or document in the conversation, Claude Code now leaves it out of the requests that follow and reports a dedicated error kind, media_removed:
- The SDK result format (what programs built on Claude Code receive) lists
media_removedas a typed API error, alongside the earlierpdf_too_largeandpdf_password_protected. api_error_paramsgainsmedia(imageordocument) andmedia_reason(unprocessable,unsupported_by_modelormedia_budget).- If a PDF is rejected because the model does not accept PDFs, the message says the PDF was removed and suggests asking Claude to read specific pages (sent as images) or switching to a model that reads PDFs.
media_budgetis reported when the error says there is too much media.
Why
If you attach a PDF to a model that can't read it, you get a message saying what to do next instead of a generic error. Tools built on the SDK can tell that a file was dropped from the conversation.
Names in the bundlemedia_removed