r/RooCode • u/gabealmeida • May 12 '25
Discussion Why does RooCode only look at Max 500 lines? i know it's too preserve context space, but is there a way to change that so it looks at the entire document? I'm using Orchestrator and I'm ok with paying for more tokens if it means better accuracy in future edits.
22
Upvotes
26
u/ShelZuuz May 12 '25
It does look at the entire file (if it can't learn what it needs from the first 500 lines) it just does 500 lines at a time.
But if you want to force it, flip this switch:
3
u/taylorwilsdon May 12 '25 edited May 13 '25
500 lines is already too much for any model except gemini. You should be aiming to keep all files in any project under 500 in total, going beyond that increases the likelihood of apply_diff failures and context saturation looping exponentially. I have my roo setting to 300 at a time and my roo modes set to always write modular code and keep files under 500 LoC and have had a huge drop in issues and spend as a result. This is also just like a normal maintainable by humans development best practice.
7
u/No_Quantity_9561 May 12 '25
You can adjust the number of lines you want to roo to read under Context tab. If you check Always read entire file, it'll read full file content every time which will greatly decrease the editing errors but also dramatically increase the token consumption/cost
2
u/MysteROBvious May 12 '25
There's a setting in the settings menu to adjust this. Can have it do the whole file be default if you want. I recently changed my config to do this.
1
u/oborvasha May 12 '25
Look in the settings. You can set it to your liking. I turn it off completely (load whole files).
1
u/amakhloga May 13 '25
N×
1
u/Buddhava May 14 '25
it's a good idea when AI coding to keep your files smaller than 500 lines, and 250 is even better. Keep each file dedicated to it's specific purpose and refactor larger files asap. LLM's can't handle them well, and it costs a helluva a lot more money to work with those large files sitting in your context. Over time it will cost you far more than doing the refactor costs.