[BUG]
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Subject: Wasted tokens due to inefficient PDF parsing approach
Hi,
I was using Claude Code to extract a classification table from a PDF file and write the results into an Excel spreadsheet.
Claude spent a significant amount of tokens attempting to parse the PDF table by analyzing X/Y coordinates from a Node.js PDF library, which produced unreliable results and required many rounds of debugging. The correct approach — using the Claude API to directly process the PDF as a document — was never suggested until I asked about it myself.
The root cause was a poor tool choice early in the task. Claude should have either:
Suggested uploading the PDF to Claude's web interface for direct extraction, or
Used the Claude API with document input to leverage the model's native vision capabilities
Instead, Claude took a roundabout technical path that consumed far more tokens than necessary without producing correct results. I ended up having to process the PDF with another AI tool myself.
I would appreciate a token refund or credit for this session, or at minimum, an improvement so Claude Code proactively suggests the most efficient approach for PDF tasks rather than defaulting to brittle programmatic parsing.
Thank you.
What Should Happen?
Subject: Wasted tokens due to inefficient PDF parsing approach
Hi,
I was using Claude Code to extract a classification table from a PDF file and write the results into an Excel spreadsheet.
Claude spent a significant amount of tokens attempting to parse the PDF table by analyzing X/Y coordinates from a Node.js PDF library, which produced unreliable results and required many rounds of debugging. The correct approach — using the Claude API to directly process the PDF as a document — was never suggested until I asked about it myself.
The root cause was a poor tool choice early in the task. Claude should have either:
Suggested uploading the PDF to Claude's web interface for direct extraction, or
Used the Claude API with document input to leverage the model's native vision capabilities
Instead, Claude took a roundabout technical path that consumed far more tokens than necessary without producing correct results. I ended up having to process the PDF with another AI tool myself.
I would appreciate a token refund or credit for this session, or at minimum, an improvement so Claude Code proactively suggests the most efficient approach for PDF tasks rather than defaulting to brittle programmatic parsing.
Thank you.
Error Messages/Logs
Steps to Reproduce
Subject: Wasted tokens due to inefficient PDF parsing approach
Hi,
I was using Claude Code to extract a classification table from a PDF file and write the results into an Excel spreadsheet.
Claude spent a significant amount of tokens attempting to parse the PDF table by analyzing X/Y coordinates from a Node.js PDF library, which produced unreliable results and required many rounds of debugging. The correct approach — using the Claude API to directly process the PDF as a document — was never suggested until I asked about it myself.
The root cause was a poor tool choice early in the task. Claude should have either:
Suggested uploading the PDF to Claude's web interface for direct extraction, or
Used the Claude API with document input to leverage the model's native vision capabilities
Instead, Claude took a roundabout technical path that consumed far more tokens than necessary without producing correct results. I ended up having to process the PDF with another AI tool myself.
I would appreciate a token refund or credit for this session, or at minimum, an improvement so Claude Code proactively suggests the most efficient approach for PDF tasks rather than defaulting to brittle programmatic parsing.
Thank you.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Version 1.569.0 (49894a)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Subject: Wasted tokens due to inefficient PDF parsing approach
Hi,
I was using Claude Code to extract a classification table from a PDF file and write the results into an Excel spreadsheet.
Claude spent a significant amount of tokens attempting to parse the PDF table by analyzing X/Y coordinates from a Node.js PDF library, which produced unreliable results and required many rounds of debugging. The correct approach — using the Claude API to directly process the PDF as a document — was never suggested until I asked about it myself.
The root cause was a poor tool choice early in the task. Claude should have either:
Suggested uploading the PDF to Claude's web interface for direct extraction, or
Used the Claude API with document input to leverage the model's native vision capabilities
Instead, Claude took a roundabout technical path that consumed far more tokens than necessary without producing correct results. I ended up having to process the PDF with another AI tool myself.
I would appreciate a token refund or credit for this session, or at minimum, an improvement so Claude Code proactively suggests the most efficient approach for PDF tasks rather than defaulting to brittle programmatic parsing.
Thank you.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗