Warning: Token usage explodes with large PDF inputs (25M tokens for a 1MB file) #64
Replies: 2 comments
-
|
Thanks for the detailed report! Could you share which AI coding tool you were using? (e.g., Cursor, Cline, Windsurf, Claude Code, VS Code Copilot, etc.) The behavior you described — "every time the file content was returned with a I regularly use Claude Code, Antigravity, Codex, and VS Code Copilot with large source files, and none of them exhibit this re-read loop. These tools either use prompt caching (so re-reads are nearly free) or retain tool results in context without aggressive eviction. Knowing which tool you used would help determine whether this is something we should address in PPT Master's workflow, or something to report upstream to the tool's developers. |
Beta Was this translation helpful? Give feedback.
-
|
I was using the Cline extension in VS Code with an Anthropic API key. I
noticed that token consumption was abnormally high, so I ended up canceling
the process.
Afterward, I tried requesting the PPT generation using GitHub Copilot
(which is already integrated into my VS Code), and it worked perfectly.
Since then, I have stopped using the Cline extension and am sticking with
Copilot for this task.
…---------- Forwarded message ---------
보낸사람: HugoHe ***@***.***>
Date: 2026년 4월 26일 (일) 오후 9:17
Subject: Re: [hugohe3/ppt-master] Warning: Token usage explodes with large
PDF inputs (25M tokens for a 1MB file) (Discussion #64)
To: hugohe3/ppt-master ***@***.***>
Cc: ShinDH-2222 ***@***.***>, Author ***@***.***>
Thanks for the detailed report!
Could you share which AI coding tool you were using? (e.g., Cursor, Cline,
Windsurf, Claude Code, VS Code Copilot, etc.)
The behavior you described — "every time the file content was returned with
a removed from context window message, the agent attempted to re-read it" —
sounds like a tool-level context management issue rather than a PPT Master
workflow issue.
I regularly use *Claude Code*, *Antigravity*, *Codex*, and *VS Code Copilot*
with large source files, and none of them exhibit this re-read loop. These
tools either use prompt caching (so re-reads are nearly free) or retain
tool results in context without aggressive eviction.
Knowing which tool you used would help determine whether this is something
we should address in PPT Master's workflow, or something to report upstream
to the tool's developers.
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BSZDY5YDT22ODWF5QMAAZET4XX46HAVCNFSM6AAAAACYGY4VP2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNZRHA2DGOA>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BSZDY57A72YXLBKXX6TL7JD4XX46HA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRXGE4DIMZYUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/BSZDY57JHFNHOBKQ5JJL6BT4XX46HA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRXGE4DIMZYUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Used a 1MB PDF and it consumed over 25 million tokens (~$8+). For a full book-length document, token usage is massive. Might be worth adding a warning in the docs about large PDF inputs.
The same file (economics_rules.md) was read more than 76 times repeatedly, wasting a massive amount of tokens. This was clearly an inefficient and unreasonable behavior.
Root cause:
Every time the file content was returned with a "removed from context window" message, the agent attempted to re-read it — causing what was essentially an infinite loop.
It kept trying to read the file even after already having gathered sufficient content.
Beta Was this translation helpful? Give feedback.
All reactions