PDF Processing: Persistent API Error After Explicit Instruction to Ignore File

Resolved 💬 3 comments Opened Jul 29, 2025 by intellia1 Closed Aug 15, 2025

Bug Description
Claude keeps returning the same error even after I instruct it not to process the PDF file that exceeds 100 pages.

Error shown:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.10.content.0.pdf.source.base64.data: A maximum of 100 PDF pages may be provided."}}

Context:
Claude attempted to read a PDF with more than 100 pages, which triggered the error (expected). However, even after I explicitly told Claude not to read that file, it continued trying to process it, resulting in repeated API errors. This makes the session unusable, as every message triggers the same 400 error again.

Expected behavior:
Claude should stop trying to process or refer to the PDF once instructed not to, and not continue to resend it internally across multiple messages.

Steps to reproduce:

  1. Upload a PDF with over 100 pages.
  2. Ask Claude to analyze files.
  3. When the error appears, instruct Claude not to read the problematic file.
  4. Despite the instruction, Claude keeps trying to process the same file and returns the same error on every new message.

This seems like a memory or state propagation issue.

Thanks!

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 1.0.62
  • Feedback ID: 64e00af2-62db-45bb-91b2-ebaea603c606

Errors

[{"error":"Error: spawn /c/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-win32/rg.exe ENOENT\n    at ChildProcess._handle.onexit (node:internal/child_process:286:19)\n    at onErrorNT (node:internal/child_process:484:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)","timestamp":"2025-07-29T18:05:59.007Z"},{"error":"Error: spawn /c/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-win32/rg.exe ENOENT\n    at ChildProcess._handle.onexit (node:internal/child_process:286:19)\n    at onErrorNT (node:internal/child_process:484:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)","timestamp":"2025-07-29T18:09:39.429Z"},{"error":"Error: Request was aborted.\n    at GP.makeRequest (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1334:3840)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-29T18:10:15.098Z"},{"error":"Error: spawn /c/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-win32/rg.exe ENOENT\n    at ChildProcess._handle.onexit (node:internal/child_process:286:19)\n    at onErrorNT (node:internal/child_process:484:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)","timestamp":"2025-07-29T18:12:34.465Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at BX (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n    at file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n    at Array.map (<anonymous>)\n    at QX (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n    at GxB (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2530:7746)\n    at dM (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at iv (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at lv (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n    at jS (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n    at IR (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)","timestamp":"2025-07-29T19:31:55.086Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at BX (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n    at file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n    at Array.map (<anonymous>)\n    at QX (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n    at GxB (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2530:7746)\n    at dM (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at iv (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at lv (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n    at jS (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n    at IR (file:///C:/Users/Pc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-cod

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗