← All errors · BoltLovable & Bolt app errors

This project exceeds the total supported prompt size

Exact error

This project exceeds the total supported prompt size. To see how to resolve this, visit https://bolt.fyi/prompt-too-long.

What it means

Bolt reads your project files together with your chat history and prompt on every request. The project has grown too large to fit in that context, so Bolt will not take the next prompt until you make it smaller.

Likely causes

How to fix it

  1. Back up first: download the project, and remember Bolt's version history can restore a version from before the cleanup.

  2. Clear the chat context: type /clear in the chatbox and click Clear context. Bolt keeps your files but forgets the old conversation.

  3. Ask Bolt to clean up, for example: "Remove any unused files and components from this project." and "Look at the number of .md files in this project and keep only the ones that have necessary project context."

  4. Or clean up from the terminal in Code view, which uses no tokens:

    npx knip --production --fix --allow-remove-files
    npx depcheck   # lists unused dependencies to remove
    npm dedupe     # removes duplicate package versions
  5. Split large files: ask Bolt to list every file over about 700 lines, then refactor them one at a time ("split [filename] into multiple files, keep the original as a router") and test after each one.

  6. Put long-lived instructions in Project knowledge or an agents.md file instead of repeating them in long prompts.

Prevent this next time

FAQ

What does "This project exceeds the total supported prompt size" mean?

Bolt reads your project files together with your chat history and prompt on every request. The project has grown too large to fit in that context, so Bolt will not take the next prompt until you make it smaller.

What usually causes it?

Very long files (thousands of lines) that Bolt has to read on every prompt. Unused files, components and dependencies left behind by earlier AI edits. Markdown (.md) notes Bolt created for record-keeping, which are read into context each time. A long chat history in the same project.

How do I fix it?

1. Back up first: download the project, and remember Bolt's version history can restore a version from before the cleanup. 2. Clear the chat context: type /clear in the chatbox and click Clear context. Bolt keeps your files but forgets the old conversation. 3. Ask Bolt to clean up, for example: "Remove any unused files and components from this project." and "Look at the number of .md files in this project and keep only the ones that have necessary project context." 4. Or clean up from the terminal in Code view, which uses no tokens: 5. Split large files: ask Bolt to list every file over about 700 lines, then refactor them one at a time ("split [filename] into multiple files, keep the original as a router") and test after each one. 6. Put long-lived instructions in Project knowledge or an agents.md file instead of repeating them in long prompts.

Related errors

More Bolt errors and fixes →

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy