Demo, all content is generated
Question

Bolt says my project is too large and responses are cut off halfway

Solved · 611 views · asked by griffin_w · edited

Around 120 files now. Bolt started warning that the project exceeds the context size, and code changes stop halfway through a file. Then the preview breaks because of a half-written component.

Do I need to start a new project?

What I’ve tried

Deleted some unused pages. Asked Bolt to "optimize the project size", it created even more files.

Comment
How many lines is your biggest file? sergio_ruiz · edited
Dashboard.tsx is about 900 griffin_w · edited

3 answers

Marked as helpful by the asker
sergio_ruiz · edited

No new project needed. Tell Bolt what not to read.

Create .bolt/ignore (same syntax as .gitignore) and exclude what the AI doesn't need to see:

public/**
src/data/*.json
src/assets/**
supabase/migrations/**
**/*.test.ts

Ignored files still exist and work, the AI just doesn't get them as context. Be careful not to ignore files you then ask it to edit.

Second: split big components. A 900-line Dashboard.tsx is what gets cut off. Ask it to extract parts into separate files one at a time.

Third: in settings, turn on diffs so it edits parts of files instead of rewriting them fully.

Comment
ignored the seed json (it was 2MB!) and public. Warning gone. griffin_w · edited
didn't know about .bolt/ignore. Instant improvement. mustafa_y · edited
siddharth_r · edited

Also check for a huge package-lock.json or sample data files the AI created. Mine had a 5000-row mock data file I never asked for.

Comment
leilani · edited

And start a fresh chat every so often. The long history counts as context too.

Comment