Live data from Hacker News

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

systima.ai

411–420 of 433 posts

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

#411

Earlier quoted context omitted.

if the website is any indication, omp is just vibe coded AI slop as well. pi is awesome but it looks like omp is a step down including unnecessary stuff no one needs. it's kinda the opposite of pi

I've heard amazing things about pi and it's effectivenes but when I tried installing it I quickly found out it doesn't respect XDG_BASE_DIRECTORY at all, you need to set some environment variables and the author rejected both a proposal as "going full gpt", seemingly not even knowing about XDG_BASE_DIRECTORY, and even rejected a PR. I've heard really good things but that being my first experience with pi didn't fill…

Interesting! I wouldn't know, because I'm on mac. I love that it's very basic and I can basically do plug and play with the stuff I need. The load, complexity and system prompt overhang is quite minimal. But in the end, opencode is also fine I guess. I don't need to fiddle around with it too much and just need it to work. So if you're happy, why switch ;) I actually use zed as an editor w/o agents lol

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

#412
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…

Agreed. The issue is that when working 1:1 you get a feel for how many tokens are being burned but the subagent spawn could be 3 or in one cases it spawned 171 to verify something. The latter was unexpected and burned through my token budget.

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

#413

Earlier quoted context omitted.

They are just making the point that it makes sense that subagents would use more tokens because they have none of the parent's context.

That is true of Anthropic's implementation but not inherent in sub-agents in general.

For the sake of accuracy Claude Code has a "fork" feature which does what you'd expect and based on traces I skimmed this morning it seems under some circumstances you get fork behavior for subagents as well.

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

#414
post #362

Doesn't that mean these 33k tokens can be cached, since they don't depend on the input? The model can just start generation on the 33k+1th token.

right, but the cache retention time is very short for Anthropics LLMs. 5 minutes or 1 hour (with additional costs). So you have to prompt basically non stop to not get a cache eviction. Anthropic even changed this silently: https://www.reddit.com/r/ClaudeAI/comments/1sk3m12/followup_...

A const prompt across all of Anthropic's subscribers could draw from a global cache rather than per-user?

Although saying that out loud makes me question it - each per-user chat and growing cache would need eventually to own its own ~contiguous memory block.

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

#415

Earlier quoted context omitted.

Compared to the primary agent, maybe. But it's highly unlikely that all the agents have different tools and system prompts than each other, and those account for the bulk of the context per the post.

Depends on if they are launched serially or in parallel then.

The system prompt and available tools would likely only change for different agent types. So how they're launched probably doesn't matter.

I say this as I don't actually know how Clade Code does this, since it's not open source, but I fail to see why two agents doing the same thing launched at different times would have different tools and system prompts.

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

#416
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…

True. For Claude Code, I disabled explore subagents globally by adding this to ~/.claude/settings.json: "permissions": { "deny": [ "Task(Explore)" ] }

Should be

"Agent(Explore)"

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

#417

Earlier quoted context omitted.

I thought I read somewhere that according to filings for going public, subscription revenue is tiny… like 5%. Edit: consumer Claude subs are the 5%. I’d bet most all of CC subs lump in under enterprise. - API & Enterprise: 75% to 85% of total revenue. - Business Subscriptions: Roughly 10% to 15%. - Individual Subscriptions: About 5%.

The fact that individuals are more likely to use the alternatives than businesses is telling. Anthropic is fine, as long as someone else (a clueless employer drinking Dario Koolaid) is paying for it. But the moment you have to pay for it, people just bail and go for DeepSeek, Kimmi, OpenRouter, OpenCode Go and other alternatives that give more bang for the buck than Anthropic.

Yep. That's my case.

I now have unlimited Anthropic and OpenAI plans at work because CEOs bought the hype.

But for personal projects $10/mo OpenCode Go serves me with DeepSeek V4 Flash, MiMo 2.5 and GLM 5.2.

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

#418

Earlier quoted context omitted.

Sure, if your fundamental issue is “bloat,” you can always write a less general-purpose system that is smaller. No doubt about that.

I guess better phrasing would be auditability, ease of codebase comprehension, coverage of just the features I want. My agent isn't meant to be for X users across Y providers with Z extensible plugins, it's meant for exactly one user, with exactly one provider, and to minimize the amount of trust granted to third parties.

Got it. Yea, if those are your priorities then it certainly makes sense to write your own.

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

#419
Worth noting/understanding, for those that are not familiar with it, that these 33k tokens are not a single 33k batch of tokens, they persist and increment in every request.. so if you have 10 requests that is 330k tokens, 100 requests 3.3M requests, 3.3M that could be ~5x less if used another harness. These 33k tokens are mostly because the harness is completely bloated with mcp, skils, plugin, loop, basic alignment and all sort of explanations needed in the system prompt for it to work the way anthropic wants it to... imo this is sub-optimal and if the model needs that much orientation, it says a lot about its intelligence too.. Good models should be as harness agnostic as possible

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

#420

Earlier quoted context omitted.

True. For Claude Code, I disabled explore subagents globally by adding this to ~/.claude/settings.json: "permissions": { "deny": [ "Task(Explore)" ] }

Should be "Agent(Explore)"

You're right, looks like they changed it, though Task should still work.

> In version 2.1.63, the Task tool was renamed to Agent. Existing Task(...) references in settings and agent definitions still work as aliases.

https://code.claude.com/docs/en/sub-agents

Post reply on HN