Solutions
Claude Code says "PDF too large". How do I get it to read the PDF?
Updated
Claude Code sends a PDF to the model as a document, whole, so a long or heavy one goes past the request limit and is refused, and the failed attempt can stay in the session's history. The reliable fix is to stop sending the PDF at all: turn it into text first and let the agent read the pages it needs. Forkbench does that for any PDF you keep in its Files: an agent's read_file returns the document as Markdown, one heading per page, in slices it can page through.
You hand the agent a spec, a contract or a datasheet as a PDF and it stops with "PDF too large". Sometimes it gets worse: the oversized document is already in the conversation, so every message after it fails too, even for small files. You wanted the agent to read twelve pages of requirements, and now you are clearing sessions.
Text is a fraction of the size of the PDF it came from, and it can be read a slice at a time, which is the part that matters for a long document. The agent reads page 1, finds the section it needs, and asks for the slice that holds it, instead of pushing the whole file through one request. The conversion happens on your Mac, in a separate process that has no network access and cannot read or write your files, because a PDF is a format with a long history of being used to attack the program that opens it. What comes back is marked as file content, data for the agent to work with, never instructions for it to follow.
How it works
- 1Add the PDF to Files in Forkbench: drag it onto the Files page, or hold Option and drop it on the terminal you are working in.
- 2Expose it to the thread, so the agents working there may read it. Dropping it on a terminal or a thread does this for you.
- 3Ask the agent to read it. It calls read_file and gets Markdown with a heading per page, 256 KB at a time.
- 4If the session already has the error stuck in it, clear or compact it first so the failed upload leaves the history.
Straight about the guarantee: A scanned PDF is a picture of text, so it has no text to extract: each page comes back marked as having none, and there is no OCR yet. Tables and multi-column layouts come out as the reading order of the text, not as a grid. Files is part of the Mac app; Windows and Linux are in development.
Frequently asked
Can't I just run pdftotext myself?
Yes, and for one file it is a fine answer. The difference is where the result lives: a text file you made is one more file in the repository for the agent to find, keep in sync and not commit, while a file kept in Files is read by name from any thread you expose it to, by any agent, and never lands in your project.
Does the PDF go to Forkbench's servers?
It is stored end to end encrypted: sealed on your Mac before it is uploaded, so the stored copy is ciphertext we cannot read. The conversion to text happens on your Mac, after it is decrypted there.
Does this work with Codex, Cursor or Antigravity CLI too?
Yes. read_file is a tool every agent in a Forkbench terminal can call, and
fb file readdoes the same from any shell, so it does not depend on the agent's own PDF support.
Related: Giving an agent a document without putting it in the repo, Prompt injection and coding agents