Anthropic API: PDF Upload Exceeds 100-Page Limit and freezes all context / progress, even after exit
Bug Description
- Attempted to have the bot review a large PDF
- It tries, gets a 400 PDF Too Long
- I ask it to do something else, same error. Cant seem to clear it out.
- I attempt to compact, refuses with same error
- I exit and then resume the chat, same thing.
- I have to kill this chat to continue using.
⏺ Now let me check the reference book that was mentioned to see if it contains spell information:
⏺ Read(~/Code/ars-saga-manager-v2/docs/reference-books/arm5-grand-grimoire-of-hermetic-spells.pdf)
⎿ Read PDF (3.6MB)
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be
provided."},"request_id":"req_011CSLJCsyisXTqRiCuhX51C"}
cont
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be
provided."},"request_id":"req_011CSLJHK7RwRtAypikTUYVS"}
ok That doesn't seem to work because it's a really big PDF. So look through that repo, because I'm pretty sure at one point I had a.md file with all of the instructions.If that doesn't work, can you run Gemini
CLI, which I have installed here, and use it to grep through for you. It doesn't have a limit.
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be
provided."},"request_id":"req_011CSLKBJKznx82iBLZjCKw4"}
Yeah, I know. Stop trying to actually read the PDF.
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be
provided."},"request_id":"req_011CSLKFoCgaNB6qxQfkdNeC"}
/compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be
provided."},"request_id":"req_011CSLKUwFjbiy2EBXwKqvpg"}
/exit
⎿ (no content)
hello are you there
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be
provided."},"request_id":"req_011CSLKdchXAhfkZeditQsf5"}
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.86
- Feedback ID:
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.38.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be provided.\"},\"request_id\":\"req_011CSLKdchXAhfkZeditQsf5\"}\n at b4.generate (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:932:2412)\n at dP.makeStatusError (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n at dP.makeRequest (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async LD1.showErrors (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:27238)\n at async LD1 (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:16345)\n at async l9B (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:27089)\n at async file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:22183\n at async dH0 (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:3514)\n at async V11 (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:22153)","timestamp":"2025-08-21T05:43:11.501Z"},{"error":"AxiosError: Request failed with status code 403\n at UN (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:692:1077)\n at Unzip.V0 (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:693:9955)\n at Unzip.emit (node:events:536:35)\n at Unzip.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at G91.request (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:695:2088)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async CW8 (file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:2419:470)\n at async Promise.all (index 0)\n at async file:///Users/alexanderhuth/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:2405:9163","time
Note: Error logs were truncated.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗