Bolt.new project too large? Tokens, context and fixes
Why Bolt.new says your project is too large, how context and token limits differ, and the steps that shrink a project so you can keep building.
Leer en español →
When Bolt.new says your project is too large, it usually means the project no longer fits in the agent's context window: the files and recent chat that Bolt reads on every prompt. That is a different limit from your token balance and from the 100MB publishing limit. You fix it by giving Bolt less to read: clear the context, delete unused files, split very long files and keep standing instructions in project knowledge instead of the chat.
This guide explains which limit you hit, why projects outgrow Bolt, the cleanup steps in the order that saves the most, and when it makes sense to keep working outside Bolt.
Which limit did I actually hit?
Three different limits produce messages that sound alike.
| What you see | What it means | First thing to do |
|---|---|---|
| A message that the prompt is too long or the project exceeds the supported prompt size | Context window: the project plus recent chat is more than Bolt can read at once | Clear context and reduce the project's size |
| Your token balance runs out, or a daily limit is reached on the Free plan | Token allowance: how much agent work your plan includes | Wait for the reset, upgrade, or edit code by hand |
Project is too large to deploy. The maximum allowed size is 100MB. | Publishing: the total size of your files | Move images and videos to external storage |
This guide is about the first two. The third is covered in our post on Bolt.new deploy failures.
Why does a Bolt project outgrow the context window?
Bolt's documentation on tokens says most token use comes from the agent reading, understanding and syncing your project files. So the context grows with the project, not just with your prompts. The usual culprits are:
- Very long files. One 2,000-line component is read in full every time Bolt touches it.
- Markdown notes Bolt wrote for itself. As it builds, Bolt may add
.mdfiles for record-keeping, and it reads them into context on every prompt. - Dead code. Old versions of components, unused pages and abandoned experiments still count.
- Long chat history. Every retry of "fix it" sits in the conversation.
- Uploaded files and connectors. Attachments add to context even when they aren't stored in the project, and connectors bring outside data in.
How do I shrink the project so Bolt can keep working?
Do these in order. The first steps are free and fast.
1. Save a copy first
Download the project (click the project title, then Download) or make sure it's synced to GitHub. Bolt's version history restores code, but a local copy lets you bring back a single file if a cleanup goes too far.
2. Clear the context
Type /clear in the chatbox and choose Clear context. Bolt keeps your files but forgets the conversation and reads the code fresh. Do it when you finish a feature, not in the middle of one.
3. Move standing instructions out of the chat
Anything you repeat in every prompt ("we use Supabase auth", "never change the pricing page") belongs in Project settings > Knowledge, or in an agents.md file, which Bolt picks up automatically. Knowledge survives a context clear; chat history doesn't.
4. Delete what the app no longer uses
Ask Bolt: Remove any unused files and components from this project. For the notes it left behind: Look at the number of .md files in this project and keep only the ones that have necessary project context. If you're comfortable with a terminal, Bolt's context guide suggests running this in the Code view terminal, which uses no tokens:
npx knip --production --fix --allow-remove-files
npx depcheck lists packages you installed and no longer import, and npm dedupe removes duplicate copies.
5. Split the longest files
Ask Bolt for a list first, without changes: List every file over 700 lines with its path and line count, longest first. Don't change anything yet. Then refactor one file per prompt, keeping the original file as a router so imports don't break, and test after each one.
6. Narrow what Bolt looks at
In Code view, right-click a file and choose Target file to focus Bolt on it, or Lock file / Lock all to keep it out of the change. Short, specific prompts ("change the date format in InvoiceTable.tsx") read far less than "fix the invoices page".
How do I make my tokens last longer?
Some actions cost tokens and some don't. Bolt's documentation lists these as free:
- Editing code yourself in Code view, and running commands in its terminal.
- The Publish and Update buttons (asking Bolt in chat to publish does use tokens).
- Restoring a previous version from version history.
- The Run security audit button in the Publish menu, on paid plans.
Other savings: use Plan mode to think a problem through before building, pick the Standard agent for routine work and Max only for complex refactors, and stop pressing Attempt fix after the second failure. Instead, ask Bolt to add logging around the broken part, reproduce the bug and paste the console output.
As of October 2026, Bolt's help center says the Free plan has a monthly allowance plus a daily cap of 300K tokens, and paid plans reset on the renewal date, with unused tokens rolling over for up to two months while the subscription stays active. Plans change, so check your balance under My Subscription before you plan a large change.
When should I keep working outside Bolt?
If the project still overflows after a cleanup, the app has simply grown beyond what one agent can hold in its head at once. That isn't a failure; it's a stage. Options at that point:
- Keep Bolt for small changes and do larger work in a code editor. With GitHub connected, Bolt pulls changes made elsewhere every 30 seconds, so both can coexist as long as you don't edit in both places at the same moment. Our guide to running a Bolt project on your own computer walks through the setup.
- Use an agent that reads files on demand, such as Cursor or Claude Code, on the downloaded code. We compare them in Claude Code or Cursor if you don't code.
- Pay down the mess first. Duplicate logic and giant files are what fill the context. Our post on technical debt in vibe coding explains how to tell what's worth cleaning.
Quick answers
Does clearing the context delete my code? No. Files stay exactly as they are. Bolt only forgets the recent conversation and how the code changed over time.
Will upgrading my plan fix "project too large"? Not by itself. A bigger token allowance doesn't make the project smaller. Cleanup and smaller files are what fit it back into context.
Is it safe to run Knip on my project? It deletes files it believes are unused, so download a copy first and test the app afterwards. Version history can also take you back.
Why did Bolt get worse as the project grew? With a nearly full context, the agent has less room to reason and may lose track of earlier instructions. Restate what matters, or put it in project knowledge.
Stuck between a full context and a half-built app?
If cleanup isn't enough, the free health check shows what's visible from outside, and our Bolt app rescue starts with a senior engineer reviewing the code and writing down what to fix, each item with a fixed price. If you'd rather keep building with a developer alongside you, see pricing or tell us about the project.


