Demo, all content is generated
Question

Bolt uses like 400k tokens for every tiny change now

Solved · 891 views · asked by kwame_o · edited

My project got bigger (around 90 files, a few big json files with product data). Now even "make the button blue" costs 300-400k tokens. At the start the same kind of prompt was way less. I'm on the Pro plan and burned half of my monthly tokens in one week.

Is this normal? Is there a setting?

What I’ve tried

Deleted some old components, asked Bolt to "use fewer tokens" (it said ok lol).

Comment
yes this is how it works unfortunately, it sends the project with every prompt tariq_builds · edited
ugh ok. so what do i do, start a new project? kwame_o · edited

3 answers

Marked as helpful by the asker
deploydan · edited

Yes, it's expected: Bolt sends your project files as context with each prompt, so token cost scales with project size, not with the size of your request.

Things that actually help:

  • Get the big data out. Those product JSON files are probably the largest thing in context. Move them to the database (Supabase) or at least to public/ and exclude them.
  • Exclude files from AI context. Bolt supports a .bolt/ignore file (gitignore syntax). Add data files, generated files, old unused components, lock files you don't need it to read:
    src/data/*.json
    public/**
    
    Careful: files it can't see, it can't edit either, and it may guess wrong about them.
  • Batch small tweaks. Five cosmetic changes in one prompt cost about the same as one.
  • Edit trivial things by hand in the code editor. Changing bg-blue-500 yourself costs 0 tokens.

At some size it's worth exporting to GitHub and continuing in Cursor/Claude Code, which only read the files they need.

Comment
The json files were 2.1MB together. Ignored them, now around 60k per prompt. wow kwame_o · edited
didn't know about .bolt/ignore, thank you leilani · edited
siddharth_r · edited

+1 to doing tiny css edits yourself. It feels scary the first time but it's just text.

Comment
tried it, changed a color myself. felt like hacking 😂 kwame_o · edited
tariq_builds · edited

What I ended up doing at ~120 files: exported to GitHub, continued in Cursor. Bolt is great to start, gets expensive to maintain.

Comment