Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.202 Home All releases olderv2.1.201 v2.1.203newer

PDF Empty Page Tree Detection

When a PDF attachment reports 0 pages (malformed or empty page tree), Claude Code now emits a specific diagnostic: "PDF reports 0 pages (empty page tree). The PDF may be invalid."

Details
  • The check runs inside the pdftoppm-based PDF-to-image renderer (external poppler-utils tool; 120 s timeout, max file size 100 MB)
  • Triggered when pdftoppm exits non-zero and its stderr matches /Wrong page range given.*last page \((\d+)\)/i with a captured page count of exactly 0
  • The error reason field is "corrupted" — the same category used for structurally damaged PDFs; the distinct message distinguishes an empty page tree from the generic "PDF file is corrupted or invalid." error
  • This check lives inside a cascaded error-classification block that also handles: password_protected (stderr contains "password"), page_out_of_range (same regex but captured count > 0), xref/trailer syntax errors (Syntax Error: Couldn't find trailer dictionary / read xref table), and a generic stderr pass-through fallback
  • Pre-conditions enforced before pdftoppm is invoked: path must be a regular file, size > 0, size ≤ 100 MB, and pdftoppm availability is verified via a cached -v probe (5 s timeout); if any precondition fails, a different error reason is returned without reaching this check
Evidence

PDF validation (search for "PDF reports 0 pages" and "Wrong page range given" inside NGo())

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.202 →