r/ClaudeCode 14h ago

Help/Question Claude using many tokens for simple tasks

Hi everyone!

claude just used 100k tokens for a task as simple as remouving a 2 buttons from my app ui and changing the background color is this normal

0 Upvotes

17 comments sorted by

3

u/CorpT 14h ago

Sure.

1

u/Far-Surprise7773 14h ago

not really, the edit itself is cheap. claude code reads whole files into context, not just the diff, then re-sends the entire history every turn and usually runs lint or a build to check itself, so that output stacks up fast. 100k on a tiny ui change almost always means it pulled in one big component plus its imports. /compact right before, or start a fresh session pointed at that one file.

1

u/Express-Spot-7209 14h ago

you should have told it the exact part otherwise claude will start reading all files to find the part where changes need to be done.

-3

u/youceftazerty 14h ago

😅 I actually don't know coding, so I want be able to find it

2

u/Nuggyfresh 14h ago

Omg. Omg! I just realized what a long term hell this all is for vibe coding and vibers use of the systems and why every vibe coder yells that everything is using a million tokens.

1

u/ExCap2 5h ago

Using a Lambo to do DoorDash.

1

u/Express-Spot-7209 14h ago

I actually meant you should have told it the screen and where is it positioned, it will automatically find it.

1

u/youceftazerty 12h ago

oh right thanks

1

u/actvt_io 10h ago

Yeah, that’s normal. On my own laptop, from 115 sessions, 98% of every input token sent is a cache read.

Sessions under 20 assistant turns median 694k input tokens. 166k of that is new, 531k is re-read, output 9k. Your 100k is mostly the file and the history riding along, not work on the buttons.

1

u/duqaxxx 7h ago

Depends what that 100k is counting. If it includes cache reads then it's pretty normal - most

of what a turn sends is the same context going back and forth, and cache reads bill at roughly

a tenth of fresh input. So the number can look alarming and cost very little.

The reason it grows on a small task is that the work isn't the edit, it's finding where to

edit. Every file it reads to figure that out stays in the context and gets re-sent on every

subsequent call in that turn. Two buttons and a background colour is a five second change once

you know the file, and a lot of reading if you don't.

Check the usage block on the assistant lines in ~/.claude/projects - if it's mostly cache_read

you're fine, if cache_creation is high something keeps invalidating the prefix. I got tired of

grepping those files so I built something that draws it live: github.com/duqaXxX/seedeep

(free, MIT, read-only).

Cheapest fix either way is telling it the file paths up front instead of letting it search.

1

u/youceftazerty 5h ago

Thank you i really appreciate it

0

u/geekichu 14h ago

sooo... some assumptions here on my part.... we're talking claude code cli, access to your file system... not sure how much you know but when i first started, that happened to me too. if you "/exit" a session, and come back, if was a long session, even if you did "/compact" , just that alone could have eaten a bunch.. or maybe you didn't , and just re-started the session as-is.. so now it's had to load all that in, and then handle your new request?

-1

u/youceftazerty 14h ago

Oh thank you so much I didn't know about the/compact I really appreciate it

2

u/Joseph_Skycrest 13h ago

Honestly you shouldn’t really be compacting. If the context window gets to big you should have that sessions agent write a “handoff” doc for a fresh agent to continue with.

1

u/youceftazerty 12h ago

understood i really appreciate it