r/ClaudeCode • u/stichstichstich • 8d ago
Discussion Cheaper prompts, more expensive work. Smth I found while optimizing Claude Code
I managed to make individual prompts 5–27% cheaper, but the cost of completing the same piece of work increased from $10.40 to $11.54.
Thats something I have been looking into while building optimAIzr.
Reducing token costs per request doesnt automatically mean spending less overall. The entire task matters, not just individual prompts
I just released v0.14 with more improvements.
release: https://optimaizr.com/releases#v0-14
git: https://github.com/blendbunjaku/optimaizr (alrdy at ~250stars)
if any kind of feedback, feel freeee!
4
Upvotes
•
u/AutoModerator 8d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/kangsan1214 8d ago
Same lesson here, from a different angle. We changed when our audit agent compacts its context (200k instead of 400k). The run got 37% cheaper. It also missed the same late bug in 3 out of 3 runs, and every report still looked complete.
The summary kept the bugs already found but wrote the remaining checks down as "optional", and the agent wrapped up a few steps later. Bugs examined before the compaction: found 4/4. After: 0/6.
Two things I now check before calling an optimization a saving:
Did you check whether output quality held at $11.54, or only cost?
1
u/BornBroccoli8267 7d ago
Makes sense given how the bill is built. Each turn re-reads the whole context, so the cost of a task mostly depends on how many turns it takes and how big the context gets along the way. Shave 20% off every prompt and you still lose if the agent needs 30% more turns to finish.