Portal by Spotify cut my Claude Code token usage by 90%

163 pointsposted 13 hours ago
by cebert

72 Comments

schainks

4 hours ago

It takes true corporate dedication to publish technical thought leadership on a page that actively fights your ability to read it.

solenoid0937

12 hours ago

So this is just delegating certain work to dumber models? I certainly wouldn't use Gemini 2.5 Flash (!!?) for code writing as suggested.

I've never had an issue with Codex or Claude reading massive files, they're really good at precise greps.

jampa

10 hours ago

> I've never had an issue with Codex or Claude reading massive files

Reading files isn't a problem they want to solve. The idea seems to be using a cheaper model to "scout" for the intended code, instead of an expensive one that reads all the things (and spends more tokens / thinks about them).

I think this might be useful because Opus 5 especially tends to over-read. So this looks like an "LLM Bloom filter", telling "hey this is the code you might want to read".

bloomfieldj

4 hours ago

This sounds exactly like what Repoprompt was built for: https://repoprompt.com/

The community edition was open sourced when the creator got hired by OpenAI a few months ago.

hankbond

7 hours ago

> "LLM Bloom filter"

very good way to put it.

lxgr

an hour ago

It's not a great analogy, since Bloom filters are guaranteed to not have any false negatives, only false positives.

That property would be very useful here, but I don't see how it would be achievable using LLMs.

ramraj07

7 hours ago

Pretty sure claude code already delegates reading a large codebase to haiku subagents.

Artimus

7 hours ago

As of July, the explore agent inherits the parent model, capped at opus.

So fable and opus use opus to explore. Sonnet uses sonnet.

I replaced my built in explore agent with one hardcoded to sonnet low effort.

https://github.com/anthropics/claude-code/issues/72940

re-thc

3 hours ago

It did used to use Haiku but that model is now too too far behind…

shubhamjain

10 hours ago

> So this is just delegating certain work to dumber models? I certainly wouldn't use Gemini 2.5 Flash (!!?) for code writing as suggested.

Why not, though? I started using OpenCode + GitHub Copilot, but I burned through my Claude Sonnet quota in just three days. I switched to GPT-5.4-mini, which uses far fewer tokens, and it’s often just as good as Sonnet. I think optimizing token usage is a good exercise. We often assume a model will be terrible, when it really isn’t.

solenoid0937

4 hours ago

My code being correct 99% of the and costing 5x more tokens is vastly preferable to my code only being correct 90% of the time and using fewer tokens.

jurgenburgen

6 hours ago

> and it’s often just as good as Sonnet. I think optimizing token usage is a good exercise. We often assume a model will be terrible, when it really isn’t.

“Often” doesn’t sound great. If the smaller model fails then I just wasted a lot of time and tokens.

lxgr

an hour ago

I wish I could say this explains a lot about the state of Spotify's apps, but they have been that way since long before AI.

bensyverson

11 hours ago

Yes, this makes little sense. It looks like it's a way to avoid having Claude read or write your code.

And why stop at 90%? I have this one weird trick to reduce Claude Code token use by 100%: use a different harness and model!

phreack

3 hours ago

Thank you, the article was so verbose I couldn't get the point just by skimming it. And it was this simple...

jrm4

an hour ago

Am I missing something? Unless you have infinity money, would it not be very stupid to pay for "precise greps?"

14u2c

11 hours ago

This does seem to just be a subagents implementation.

pmdr

5 hours ago

I wish websites would stop messing with the scrolling behavior.

dotancohen

14 minutes ago

After seeing a few comments about scrolling on that page, curiosity got the better of me and I dared open TFA.

I found no problem scrolling. Either Firefox on Android doesn't support whatever trickery they are doing, or they reverted it.

landr0id

an hour ago

I used to date a girl who was a designer and had to plead with her that breaking behaviors I'm used to is not a positive UX.

"But it adds motion" was the classic reply.

amsterdorn

2 hours ago

+1, this bothers me more than it should.

jnwatson

12 hours ago

It cuts token usage because they are using a different service with a different token budget for the reader/code writer tasks.

You can also just delegate this to subagents with Claude Code (though you have a more limited choice of models unless you swap the cheaper models via OpenRouter).

I'm OK using a dumb model as a smart grep, but the whole point of using the frontier models is using their intelligence for the hard stuff like coding.

CaveTech

9 hours ago

You can also use hooks to force the use of subagents for this. The stack here is entirely unnecessary

spockz

6 hours ago

I’m currently on codex can it also this? I find it hard to make accurate benchmarks in token use for these kind of changes because I don’t keep repeating the same tasks.

Basically I run in luna high or extra high continuously with a terra subworker dedicated to planning and difficult research questions. Then I end with a final review in Terra or Sol depending how big the feature is.

sognetic

6 hours ago

There are a bunch of approaches that do this kind of thing to reduce token usage ("semble" came to mind, technically different but functionally similar) but their performance is usually mixed because the models haven't been RL tuned to use them as they have the default tool suite. Combine that with the incentive by Anthropic et al. to make you actually burn through as many tokens as possible and I don't see these kind of things becoming mainstream yet. Maybe once we reach a point where consumers actually care about cost (because LLMs have become commoditized) these cost-reduction approaches become relevant enough to actually finetune the model with them.

faangguyindia

10 hours ago

It doesn't work well in practice.

Try it yourself, use a big model like Opus or Sol to implement everything by first making a plan using plan mode.

Then try distributing the task to a cheaper models like Luna Max or Gemini Flash 3.8.

During planning, the big model already reads the relevant files in context, while giving a smaller model a slice of work itself requires the big model to reason about the task distribution, review, etc.

So do you really save on tokens?

majormajor

7 hours ago

When I've tried it using API-rate billing I've saved on $$ on the tasks where I split planning+execution into Sol+Terra or Terra+Luna even. I wasn't paying attention to the token count, I was paying attention to the spend.

klodolph

9 hours ago

> Try it yourself, use a big model like Opus or Sol to implement everything by first making a plan using plan mode.

When I do this, I can have it use cheap subagents with models like Luna to read the relevant files.

MPSimmons

9 hours ago

Do you have the cheap models summarize the files? How do they get the relevant information to the bigger models?

skybrian

10 hours ago

Maybe not, but I like to review the plan anyway so that I'm less surprised by what it actually did.

shikck200

7 hours ago

Side note: PLEASE DONT hijack scroll. Its just a bad bad thing to do. Please dont.

Banditoz

11 hours ago

Oh dear, why does this website override scrolling behavior?

tobinfekkes

8 hours ago

My first thought too! I couldn't put up with it. Left quickly.

orliesaurus

11 hours ago

glad im not the only one that enabled screen reader mode to scan the article for some goodies

gruez

11 hours ago

>The benchmarks

>Tested against a Java monorepo across four scenarios, measuring tokens Claude would consume reading files directly vs. consuming the bulk-reader's summary or writing code via the code-writer. Mean bulk-read savings were around a whopping 90%.

>The code-write scenario is harder to measure in tokens because without shunt, Claude both reads the reference files and generates the output as expensive output tokens. With shunt, the code goes straight to disk, Claude never sees it.

So nothing about accuracy or actual performance? At least run against DeepSWE bench or something.

gilmtz

10 hours ago

> The worker model found surface-level patterns but missed a subtle thread-safety bug in my testing. Claude spotted it in seconds once given the right context.

So the actual performance was bad.

It might be an acceptable trade off tho. If token costs become prohibitive, then using a meat engineer to actually debug could be cheaper.

amelius

3 hours ago

I want a local model that I talk to, and that delegates work to whatever model it deems adequate, simplifying and perhaps even anonymizing the prompts/data as it goes.

thewhitetulip

25 minutes ago

Are such things really helping reduce tokens? I see graphify being suggested as a graph db for avoiding greps

ryuuseijin

10 hours ago

Here is another technique to save tokens: allow the model to read a skeleton of the source code before reading the code, to give it an index into the code so it can read targeted chunks.

There is a tool that uses ripgrep and treesitter that does this [1], adapted from the maki coding agent.

[1]: https://github.com/ninjaxtools/treesitter-index

chr15m

10 hours ago

Aider pioneered this with the "repo map" which works tremendously well.

ZeWaka

8 hours ago

Yep, there's also prewalk.

sandos

4 hours ago

Isn't this already done in harnesses? I mean I see Terra or Sol uing Luna all the time for tasks when using copilot.

tolugenius

12 hours ago

Isn't this a somewhat standard multi-model setup? there's nothing ground breaking here, just delegate claude to plan -> smaller model for implementation.

CharlesW

9 hours ago

Very standard in all coding harnesses/models I've worked with, with the bonus that everything listed in the "What doesn't work in Portal by Spotify" section still works. I've been watching Opus spin off work to Fable and Sonnet as appropriate all day.

spockz

6 hours ago

Do you have specific instructions that cause this or did it come out of the box? Is it also when using normal prompting or only when you set a goal?

In codex I don’t see this behaviour despite having added the instructions to do so to my agents file. I also let that agents file be reviewed by Sol to come up with the right phrasing but no luck so far.

florians

7 hours ago

Can you name some harnesses?

hexo

24 minutes ago

What a "smart" website that steals mouse wheel.

FelineStateMach

10 hours ago

I sometimes get jumpscaped at the thought of older or less proven models used in enterprise settings. I understand the devex ergonomics argument; I'm not a fan of profiles concepts typically if trodding into delegation.

jokethrowaway

5 hours ago

If you want an expensive model to reason on your files, you need to give them your files.

If you think a cheap model is smart enough to filter information to give to your expensive model, you can save some money. If you think your cheap model is smart enough to format your expensive output, you can save some money.

In practice, this didn't work well until Qwen 3.8.

Qwen 3.6 and (abliterated) Gemma 4 were almost there but still making mistakes.

kotaKat

an hour ago

So they're using this to finally implement AirPlay 2 support, right?

Right?

Rules for thee...

shevy-java

2 hours ago

> By 2028, AI coding costs are expected to blow past the average developer's salary. A quarter of engineering leaders already burn $200–$500 per developer per month on tokens.

Wasn't the AI promise to save costs? So it was a lie.

simianwords

6 hours ago

Not only does this study not control for quality of output, it doesn't even show a cost reduction. Its a very low signal article.

bakugo

7 hours ago

I cut my Claude Code token usage by 100% by writing the code myself.

dotancohen

11 minutes ago

That saves on the monetary budget. How do you see it affecting your time budget?

3371

5 hours ago

codegraph + context mode are all I need.

avazhi

10 hours ago

Dang, not even Spotify care enough to not write AI slop articles.

We’re fucked.

kristianp

4 hours ago

They should use their portal to de-claude the writing.

pmontra

6 hours ago

I noticed

> The modes are the load-bearing piece:

Why do people write like LLMs? Maybe they delegate all the work to a LLM and don't have the time or the will to edit the copy. How about telling another LLMs to replace at least the most common LLM patterns with something human looking?

eterm

3 hours ago

I don't feel like this was a piece by someone who has used LLMs too much.

I'm fairly confident this is just LLM writing the majority, possibly tweaked by a human.

Opening line is a form of, "It's not X, it's Y": ".. isn't thinking. It's I/O".

Then the start of the second paragraph is that weird breathless kind of writing:

> Reading five files to answer a question about one method. Generating a test file that follows the exact same pattern as the twenty test files next to it.

More "It's not X, it's Y": The seat license isn't what hurts, it's the tokens.

The softly pressed insistence that AI is worth it, really: "The tooling pays for itself but only if..."

stephbook

7 hours ago

I could only read one sentence, then skipped to another paragraph. Sure enough the scroll bar revealed a suspiciously long article. No human would ever write this much bland bullshit.

Next sentence was also an AI juxtaposition. Done.

blehn

9 hours ago

To be fair, Spotify was a slop factory long before LLMs started doing it

lowbloodsugar

7 hours ago

Spotify? The company pushing AI “music” into people’s feeds to save money on royalties? That Spotify?

vagabund

7 hours ago

Yeah, stopped reading after the first paragraph. It's really so disrespectful to your audience.

florians

7 hours ago

It‘s someone from R&D probably not so official

prmoustache

7 hours ago

They are in the business of selling audio slop streams, why are you surprised?

tetrisgm

12 hours ago

This is just offshoring but for models

cute_boi

10 hours ago

STOP hijacking my scroll. I don't know why chrome even allow such behavior?

And, I can't believe this is from official spotify.... What a joke.

throooooo

8 hours ago

Smooth as butter with Firefox on Android. As for why scrolljacking is "allowed", web devs will always find new ways to do annoying things and work around browser constraints.

pmontra

4 hours ago

I confirm that. Then I opened the page in Chrome on Android and it scrolls nicely there too. So maybe they broke only desktop browsers.

1saadcodes

5 hours ago

I swear. Put me off so bad I didn't even bother reading the rest of the article. It's even more infuriating that this is by a company this big