Live data from Hacker News

Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

systima.ai

211–220 of 433 posts

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#211
post #88

Earlier quoted context omitted.

Once I realized that Anthropic is a token merchant, I start to understand Anthropic’s decision more. They are always finding reasons for you to use more tokens through them unless the users revolt or demand some guardrails.

I bailed on Anthropic the moment they started blocking alternative harnesses like pi on their subscription plans.

If I were anthropic I’d force that too. They offer the harness and if they control the entire pipeline then they can optimize the entire experience. It doesn’t have to be nefarious.

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#212
post #6

And pi agent is even less. The entire agent system prompt can be seen here: https://github.com/earendil-works/pi/blob/main/packages%2Fco...

If you really want a minimal agent that you heavily customize, just skip pi (130+ transitive dependencies on the "minimal" pi-coder package) and write your own. You learn a bunch, and it's not hard. You can even ask another LLM to help you get started.

That’s certainly doable, but then you need to create all the add-ons you would have added to Pi. IMO, Pi stands in that sweet spot between being very minimal while still offering a catalog of pluggable functionality that you can add to it. Sure, you could vibe code all those things for your custom agent as well, but why recreate what is essentially Pi all over again (the main loop with all the extension hooks, etc.)? Pi is the “standard” batteries-not-included agent, where you can add from a catalog of pre-defined batteries. I recommend starting with Pi and then using an LLM to code custom extensions where the catalog doesn’t have something you want.

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#213

Earlier quoted context omitted.

You can't afford the best model. What are your specs and what models + quants have you tried? Qwen 3.6 35B A3B and Qwen 3.6 27B can both do reliable tool calls on Pi at Q4_K_M using llama.cpp

I'm on a 48 GB M5 Macbook Pro. I use 4-bit quants with a context window of 16-32k. I tried Qwen 3.6 27B, but I can only get around 10 tokens per second, but it's painfully slow, and it often fails during `write_file` tool calls, even with Qwen Code.

Try an 8 bit quant of Qwen 35B, but temper your expectations. Those Qwen 3.6 models are impressive for the size, but you need an order of magnitude more parameters to actually be useful for more than trivial work in my opinion.

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#214

Earlier quoted context omitted.

I bailed on Anthropic the moment they started blocking alternative harnesses like pi on their subscription plans.

If I were anthropic I’d force that too. They offer the harness and if they control the entire pipeline then they can optimize the entire experience. It doesn’t have to be nefarious.

It's like Microsoft banning Vim users that use Azure

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#215
post #53

What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. If I let the main agent do the same task sequentially, it was no problem at all. I don't know if it's really just communication and orchestration that makes sub agents so inefficient, or…

> What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. Probably because the general purpose subagents inherit the parent model. I tell Claude explicitly to use Explore subagents, which use Haiku only, now.

[flagged]

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#216

Earlier quoted context omitted.

Sub agents each have to read part of your code base again to get enough context for the task. And if they take too long, your orchestrator's context is no longer in cache so you pay full price for that again once the subagents finish If you do it sequentially you only read those files approximately once, and everything hits the same prefix cache

Yes but one of the key things about subagents is they keep all of their tool calls and exploration out of the parent context. If you plan on continuing on in the parent, and aren't going to necessarily be touching the systems the other agents are exploring, it can be worth it. It's useful in certain situations where the parent context may need the "10,000 foot" view of something without going back in there. But subsy…

It seems like there could be a useful strategy of writing a plan with a main agent, and then instead of spawning subagents to implement, fork the main context to write each part. Then use one last fork to verify the work. That way you keep reusing the same context without polluting your main context for when you are ready to continue.

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#217
post #201
post #53

What really burns tokens is sub agents. I once gave Claude Code a pretty big task, and it immediately launched 7 sub agents which burned through my budget before even one of them was finished. Tried again 5 hours later: same result. If I let the main agent do the same task sequentially, it was no problem at all. I don't know if it's really just communication and orchestration that makes sub agents so inefficient, or…

I had learnt that trick, so now I explicitly disallow Fable subagents. Yesterday, I wanted to review a complex piece after a large refactoring, and requested a review plan beforehand. The first step was 8 agents + one more to verify the findings (all Fable). Looks good, approved. The verification step turned into an attempt to throw a party with 41 Fable verifiers. It will find a way.

Don't do that; limit concurrency

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#218

My opinion is that claude code uses more tokens simply because Anthropic makes more money that way and forces people into their subscriptions. This is supported by the fact that they won't let you use your sub on a different coding agent. I use pi btw.

> My opinion is that claude code uses more tokens simply because Anthropic makes more money that way and forces people into their subscriptions.

OTOH, this makes typical subscriptions usages consume more tokens, which are included in their flat fee.

This sounds more like incompetence than malice.

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#219

We should discuss cache performance if we haven't already. That 33k tokens may be a cache hit (I am not certain it's automatically a cache hit) but after the first call, it should certainly be a cache hit. Cache hit tokens are billed at 1/10th the price of cache misses. This is quite opaque, but it's necessary when you're asking "is the system prompt worth its stay" if you can save 33k tokens worth of dynamic discove…

Anthropic's cache expires after 1 hour when using subscription endpoints, and for those cached tokens cache reads are free. It's generous (compared to API pricing) but it's not 100% free.

Isn’t it 5 minutes ttl now?

Re: Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

#220
post #88

Earlier quoted context omitted.

Once I realized that Anthropic is a token merchant, I start to understand Anthropic’s decision more. They are always finding reasons for you to use more tokens through them unless the users revolt or demand some guardrails.

now reealize that LLMs are trained to produce tokens and like the halting problem, cant be trained not to produce tokens and youll realiE the AI labs are the perfect essential capitalist and like cancer, will keep growing useless tokens until it kills its host. no amount of alignment will stop aomeone drom just shutting up.

LLMs might be trained to produce tokens, but Anthropic don’t have to price by tokens. If an organization is a ‘non-profit’ and they decided to design their pricing to be tokens-based, I get it. If a for-profit design their pricing to be tokens-based, I don’t know where are they drawing the line between profit vs benefit. That doubts makes it hard for me to be a customer. Disclaimer, I still use Claude…
Post reply on HN