| ▲ | tosh 4 hours ago |
| I can only recommend to regularly measure how many tokens a harness+model combination uses for a certain task There are huge token efficiency/bloat differences between agents while working on the same tasks, using the same model, in the same environment Yesterday I ran 10 agentic tasks using GPT 5.6 Sol in an ubuntu 26.04 vm a couple of times with different harnesses and got vastly different token usage. +-------------+-----------+-----------+-----------+-----------+--------+
| Harness | API total | Input | Cached | Uncached | Output |
+-------------+-----------+-----------+-----------+-----------+--------+
| smol | 172,807 | 142,334 | 8,704 | 133,630 | 30,473 |
| Pi | 427,211 | 392,767 | 137,216 | 255,551 | 34,444 |
| OpenCode | 1,564,429 | 1,523,957 | 1,204,736 | 319,221 | 40,472 |
| Codex | 3,005,744 | 2,953,154 | 2,649,344 | 303,810 | 52,590 |
| Hermes | 3,856,611 | 3,808,231 | 3,167,232 | 640,999 | 48,380 |
| Claude Code | 5,073,137 | 5,029,969 | 4,587,008 | 442,961 | 43,168 |
+-------------+-----------+-----------+-----------+-----------+--------+
https://x.com/__tosh/status/2083593799872237680I'm not surprised that Claude Code is not optimized for an OpenAI model but I was still quite shocked re how much of a difference the harness makes. Disclaimer: I'm working on 'smol' which is a minimalist harness but it's really nothing special, just a minimal system prompt, no skills files, only tool is shell Do not underestimate how much popular harnesses are spamming the context window. The context window is very important. |
|
| ▲ | bermudi 16 minutes ago | parent | next [-] |
| If you're working on smol? How complex is your work? The agent has to do everything using sed? Did you write your own tools? I guess my question is, why aren't you using pi? The difference in tokens between the two also makes super curious. The system prompt can't be that different (I'd even bet Pi's shorter) and the 4 tools shouldn't make as much of a difference. I'm gonna have to try it. |
| |
|
| ▲ | bonestamp2 3 hours ago | parent | prev | next [-] |
| > Do not underestimate how much popular harnesses are spamming the context window. The context window is very important. Do we have any insight into whether it is actually spam and not useful info such as project or programming language specific context? |
| |
| ▲ | tosh 10 minutes ago | parent [-] | | in my book anything that is (I'm sure well intentioned) and injected to help the agent — but doesn't help it — is a waste of tokens but even injected context that when I read it sounds useful can oversteer the model and make it second guess or take a more complicated route than it normally would (you can see this when looking at traces with and without that injected context) often harnesses also mention in their system prompt locations of markdown files that the model can consult if the model thinks they might help that hint alone as part of the system prompt can be strong enough to make the model read in more tokens than would have been necessary 'spam' is maybe a harsh way to say it unfortunately I don't see an easy way other than to invest time and tokens into finding out which parts of the added context (in system prompt, injected in turns etc etc) are actually helpful or harmful and when I'm just doing the easiest thing I could think of: start from nothing or close to nothing that seems to work better than what most harnesses are doing turns out GPT 5.6 Sol is all you need |
|
|
| ▲ | adoltech 29 minutes ago | parent | prev | next [-] |
| > The context window is very important. It is everything. My experience with Claude Code is that you have to decide when to compact to make it efficient. It defaults everything to 1M context and it will never keep it in check. It is strange how little cache reads you hit in smol, that may be a configuration issue. |
| |
| ▲ | tosh 16 minutes ago | parent [-] | | I will look into it more to see if I have configured it wrong but I think the token efficiency hurts cache use as caching only starts at 1024 tokens so for tasks where smol is under or close to 1024 tokens most of them are uncached |
|
|
| ▲ | yojo 4 hours ago | parent | prev | next [-] |
| Claude Code injects a ton of tools into the system prompt, including their “memory system” that’s like 10k+ tokens. Depending on your task shape, this can easily double your task cost (e.g. a low context-using job that takes many turns, like a monitoring loop). You should use --disallowed-tools to prune any tools not needed for the task. Note that this is also a perpetual game of whack-a-mole since they’re always adding new tools. |
| |
| ▲ | KronisLV 3 hours ago | parent | next [-] | | > Claude Code injects a ton of tools into the system prompt It's so unfortunate they don't let you use the subscription with other harnesses anymore - since even if I used OpenCode they'd still get a bunch of useful data from the API calls, meanwhile I could stretch their tier limits way further. | | |
| ▲ | jeffrwells 2 hours ago | parent | next [-] | | According to ccusage I use about $5k of tokens on my $100/mo Claude Max plan and only hit 5-hr windows where I have to switch tools for a couple hours about once a week | |
| ▲ | epylar 3 hours ago | parent | prev | next [-] | | Subsidized Anthropic subscriptions seem to work fine on the oh-my-pi harness, somehow. | | |
| ▲ | 3uler 20 minutes ago | parent [-] | | Calling per token usage of the US closed source labs has always been funny to me, we have a clear model of what it actually costs to host these models from open models. Your subscription is not subsidised, it is just closer to the actual cost of the model… |
| |
| ▲ | epolanski 3 hours ago | parent | prev [-] | | It's so unfortunate people don't realize it's cheaper to write their own well working agent instead of insisting with general purpose bloated ones like Claude. 200$/month is a lot of money on Luna/DS4 flash, like really a lot and the results are much better than clowning on bloated CC. It's absurd how you have more and more organizations encoding their processes on LLMs and "engineers" (charlatan coders) don't even bother optimizing the tool they use most. | | |
| ▲ | RussianCow 3 hours ago | parent [-] | | > the results are much better than clowning on bloated CC. I won't argue with the cost effectiveness, but the results are very much not better. Opus and Fable are in a different league than DS4 Flash. Even GPT Terra, which I really like overall, sometimes gets stuck in weird loops and starts to do stupid stuff once its context window fills up. Whereas I can more or less trust the big models to just Do The Thing™ on the first try. With that said, you get way more value out of a GPT subscription than you do from Claude, partly because of the ability to use more efficient harnesses. |
|
| |
| ▲ | visarga 4 hours ago | parent | prev | next [-] | | The system prompt part is surely cached across all users. | | |
| ▲ | yojo 4 hours ago | parent | next [-] | | You still pay cache token costs on API calls. Cache cost/token are 90% lower, but you pay it every single turn. I’m not sure if they let you skip the cache write cost on the first turn. That would imply cross-user caching infrastructure or special casing the default system prompt to give you a discount. Maybe? Away from the computer but you could try a “hello” in a fresh session and see what was billed. | |
| ▲ | dcrazy 4 hours ago | parent | prev | next [-] | | For Anthropic models, yes. But OP was using Claude Code with GPT. | |
| ▲ | tosh 4 hours ago | parent | prev [-] | | the system prompt still takes up useful space in the context window and steers the model into unnecessary actions and over-thinking patterns |
| |
| ▲ | tosh 4 hours ago | parent | prev | next [-] | | ty re --disallowed-tools for coding agents 'shell' is often all you need (just make sure the environment has the necessary tools) | |
| ▲ | colourclash 2 hours ago | parent | prev [-] | | appreciate the tip, kind netizen |
|
|
| ▲ | azuanrb 4 hours ago | parent | prev | next [-] |
| What tools are you using to run the comparison? Or are you just running the prompts and checking them with something like ccusage? I’m asking because I’ve been looking for agent harness comparison tools too. I’m interested in more than just the inputs and outputs—I also want the system prompts, traces, and tool calls. It’s useful to understand why Codex, for example, uses more tokens while Pi doesn’t. Fewer tokens aren’t necessarily better if the agent skipped important checks. On the other hand, using more tokens could just mean it’s overthinking the process. Either way, seeing the full execution trace for the same task is really valuable. |
| |
| ▲ | tosh 4 hours ago | parent [-] | | I built an ad-hoc custom comparison framework to inspect system prompts, caching behaviour, tool call outputs, exact api requests and responses and so on I agree fewer tokens is not necessarily better but a bit counter-intuitively often the harness using fewer tokens is not only done faster but has better results (that said: of course check the results, look at the full traces, agree!) | | |
| ▲ | azuanrb 3 hours ago | parent [-] | | Thanks! I ended up built my own too. Just thought there are other better options out there that I might've missed. |
|
|
|
| ▲ | Groxx 4 hours ago | parent | prev | next [-] |
| Running some local models and wondering what insanity was consuming 100k+ tokens to respond to "hello world" was rather eye-opening, yeah. Full of pointless fluff. |
|
| ▲ | chrisweekly 2 hours ago | parent | prev | next [-] |
| Thanks for sharing.
Naming tangent: FWIW I have recent interest in "smolvm" microvms from smolmachines.com, which are unrelated. |
|
| ▲ | applfanboysbgon 30 minutes ago | parent | prev | next [-] |
| While there's a lot of bloat in the harnesses, almost all of it is cached. Your harness appears to be caching almost nothing. That will almost certainly bode extremely poorly for longer-running tasks than the simple ones you mentioned testing. Benchmaxxing for simplistic tasks could leave you not only suffering in completion rate on complex tasks but also possibly even not end up with the cost gains you're hoping for. And maybe that's fine if the only thing you use agents for is the very simple tasks, which is certainly a defensible decision, but probably bears mentioning when you're comparing it against harnesses with a different design goal. |
| |
| ▲ | tosh 21 minutes ago | parent [-] | | smol is also prefix caching the uncached tokens are also from runs where smol finished a task below 1024 tokens (the minimum amount of tokens needed to activate caching) which is less tokens than other harnesses are using for their system prompt (!) > GPT-5.6 and later models: Caching is available for prefixes containing at least 1,024 tokens. This is a strict minimum. https://developers.openai.com/api/docs/guides/prompt-caching so in this specific case the count of uncached tokens for smol makes it look worse than it actually is that said: it does makes sense to add more tasks that are difficult enough to fill the context window to compare the harnesses for how well they deal with compaction staying below compaction (or with compaction at fewer compactions) is not only cheaper and faster, it also helps the agent stay on track | | |
| ▲ | applfanboysbgon 5 minutes ago | parent [-] | | Yes, I do agree that avoiding compactions is extremely desirable, just make sure you're actually testing for how well that happens and the results! | | |
|
|
|
| ▲ | brettgriffin 4 hours ago | parent | prev | next [-] |
| Anything else I can read about smol? also, are you using a tool to collect those metrics? what is it? |
| |
|
| ▲ | xienze 2 hours ago | parent | prev | next [-] |
| > There are huge token efficiency/bloat differences between agents while working on the same tasks, using the same model, in the same environment Be careful here. Remember these are non-deterministic models at the end of the day, and even with everything being "the same" you can have two runs where the same model, same harness, same tools can arrive at the same conclusion through a wildly different sequence of events. |
|
| ▲ | zuzululu 2 hours ago | parent | prev | next [-] |
| this benchmark is a very misleading because it doesn't necessarily point to these harnesses saving usage and much of the harness that comes with codex for example is designed at cross functional agentic usage which you will be leaving behind by using a different harness. openai spends a lot of time as does claude. also note that cached is what makes up bulk of the total and codex and claude has huge discounts in that scenario. the "spamming" is mostly compaction appending files, tool artifacts, images in its summary there is a known github issue for codex. only solution is periodic clean up but its also how a lot of the agentic orchestration is performed and able to work for days. |
|
| ▲ | esafak 4 hours ago | parent | prev | next [-] |
| Same task? How did the results compare? |
| |
| ▲ | tosh 4 hours ago | parent [-] | | the tasks were all simple agentic tasks like creating a checksum of a file, merging csvs and so on, fixing a makefile pipeline with known 'good' outcomes all harnesses could reach the outcomes, only cost, time, number of tool uses and so on were different (Claude Code failed once in 1 task but I think that was just an unfortunate outlier, the tasks aren't that difficult) |
|
|
| ▲ | ignore_prev an hour ago | parent | prev [-] |
| [dead] |