Live data from Hacker News

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

systima.ai

41–50 of 433 posts

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

#41
post #5

This isn’t limited to large system prompts. Coding-agent harnesses are also becoming more aggressive about using tools, even for trivial requests. In our tests, prompts such as “Hey” or “commit” sometimes triggered 30+ tool calls: https://quesma.com/blog/the-true-cost-of-saying-hi-to-an-ai-... Tokenflation seems very real: the number of tokens consumed by simple tasks keeps increasing.

I often find myself annoyed when Opus fixes a typo in a comment and decides to run tests, lints and whenever else it can find to run. Often it will start by stashing current changes just to preemptively check if all tests were passing before. And I can blame myself a bit because my rules do say: verify all changes with tests. But as there is that I in AI that is hyped which you’d think means it knows not to put tomat…

Following rules like "verify all changes with tests" down to a tee is usually a desirable trait in LLMs. Personally I'd leave that behavior there (just like with humans for some tasks like aviation you have them go through checklists even if some stuff you can infer is not needed). But otherwise just make it "always run tests unless you're absolutely sure they can be skipped".

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

#42
post #29

With Fable being per token instead of on the subs (unless they changed it again?), I decided to test Claude code on OpenRouter where I had some credits, with Opus 4.8 and Fable 5. I asked both a trivial question (summarize last commit). Opus cost 50 cents, Fable about $1. That checks out because Fable's twice as much in the API (though I think its emphasis on correctness makes the difference larger for bigger tasks).…

As for context size and harnesses I did make a trivial bash agent based on this "agent in 50 lines" tutorial[0] recently, and found that for trivial work, it was about an order of magnitude cheaper and faster.

I haven't tested it on anything bigger but it doesn't seem to do the kind of proactive testing, that they do in bigger harnesses.

Codex at least has a system prompt that tells it not to consider a feature a complete until it has verified it. I'm not sure about Claude Code.

I suppose I could add that one line to the prompt, and it would get me much closer to agi :) I think Fable does this proactively even without a prompt, but I haven't tested that yet.

If Fable in my own harness is significantly cheaper than Claude Code, that would be very appealing. (I could actually afford to use it for most things!) But I think most of the cost comes from the testing it does. So we'll have to see.

[0] https://minimal-agent.com/

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

#43
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.

This is a truly underrated approach IMO

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

#44
post #11
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...

Maybe related to this minimalism, Pi doesn't come with most of the tools an LLM needs to function efficiently or effectively. I get that a blank slate is the paradigm, and you can add whatever you want, but it's too blank IMO.

It's easy to add using plugins.

What do you miss? I ask because I do some heavy work with pi + GLM 5.2 (using opencode Go subscription) and my workflow is plan -> implement.

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

#45

Claude Code sending 33k tokens before reading the prompt is the AI equivalent of a consultant who bills you for the time spent reading your email before they even open it.

Well, I have to open the lid on my computer and remember my password, no?

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

#46
post #29

With Fable being per token instead of on the subs (unless they changed it again?), I decided to test Claude code on OpenRouter where I had some credits, with Opus 4.8 and Fable 5. I asked both a trivial question (summarize last commit). Opus cost 50 cents, Fable about $1. That checks out because Fable's twice as much in the API (though I think its emphasis on correctness makes the difference larger for bigger tasks).…

Fable's subscription inclusion theoretically ends EOD today. Anthropic put a wishy-washy "if we have capacity we'll continue it" thing, and given how competitive GPT 5.6 Sol is, and it is included in OpenAI's subscription, I fully expect Anthropic to extend Fable or they will have a serious exodus on their hands.

Competition is good.

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

#47

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.

> This is supported by the fact that they won't let you use your sub on a different coding agent

I mean, that's a very weak argument? Isn't a much more plausible explanation that with your tooling you'll have more of a lock-in than with just your model?

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

#48
Recently switched to Codex after 6m in Claude. Codex seems more open, it’s easier to follow what the model is doing and the approvals have a better UX. Overall, it just feels more transparent. Cost of switching was close to 0.

I don’t like that Claude became more opaque around February, including the system prompts. 33k feels way too much.

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

#49
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...

Read through it an I'm curious whether setting the date and cmd on every system prompt call will cause the cache to invalidate.

I guess the cache would only be invalid if the day changed or the root directory, which would technically happen infrequently enough.

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

#50
post #8

Early on in experimenting with local models, I found that hooking them up to Claude Code worked very well, but it was also really slow. I used mitmproxy (setup assisted by Claude, natch) to capture Claude Code's entire initial system prompt and the whole thing was (I just double-checked) 162k of JSON. This led me to start experimenting with Pi, OpenCode, and Hermes...

This is interesting, because if I start a fresh session of Claude Code right now and run /context, I see the following:

   Opus 4.8 (1M context)
   claude-opus-4-8[1m]
   23k/1m tokens (2%) 

   Estimated usage by category
   System prompt: 3.9k tokens (0.4%)
   System tools: 13.9k tokens (1.4%)
   Custom agents: 235 tokens (0.0%)
   Memory files: 28 tokens (0.0%)
   Skills: 4.9k tokens (0.5%)
   Messages: 8 tokens (0.0%)
   Compact buffer: 3k tokens (0.3%)
   Free space: 974k (97.4%)
4k tokens is 15-20kB. I'd ask you to paste that into a gist, but it might have sensitive data in it, because I suspect what you're seeing is not just the system prompt.
Post reply on HN