To read a PDF, Claude Code runs a separate program called pdftoppm, which turns PDF pages into images. When pdftoppm fails, Claude Code reads its error output to work out what went wrong. It then reports the failure as, for example, a password-protected file or a corrupt file.
That sorting is now stricter:
- File paths are removed from the error text before it is checked for words that suggest a password or a corrupt file.
- A "Couldn't open file" error counts as a problem with your file only if the line matches exactly and pdftoppm exited with code 1. An exit code is the number a program returns when it finishes.
- Claude Code sometimes passes pdftoppm a different path from the one you gave. If it did and pdftoppm could not open that path, the failure is now reported as an unknown error, not as a problem with your file.
Before this change, a failure was treated as a problem with your file whenever the first error line started with "I/O Error: " and contained the path, or started with "Permission Error: ".
A PDF whose file name happens to contain a word like "password" or "corrupt" no longer gets an error message that blames the file's contents. Failures caused by Claude Code's own path handling are also no longer blamed on your file.