I’m Vibe Coding an extension for Blender 4.4.3 since I don’t know enough Python to do it on my own. Last week the code I had generated through Cursor barely touched 1,900 lines and Claude 4 said it was too lengthy for them to see.
This week, after starting over from scratch, the code is 2,348 lines and so far no complaints from Claude 4. So IS there a maximum script length before I need to start making additional script files, or is the complaint from Claude depending on how many users are online at the moment?
If it helps I’m not using MAX mode, but I do have the pro subscription.
Yes, there is. But in MAX mode you probably will reach it much later. You can check in the chat how many tokens it uses.
What’s the maximum length of a given script not in MAX Mode? is the ‘120k context window’ in reference to script length? I am new to all of this, so trying to learn as fast as I can.
Hey, you can find this information in our documentation:
1 Like
Oh i see. I think I was somehow confusing “tokens” for redeeming points for the AI to interact with me. so my script can be up to 120k lines of code then? I don’t see an exact answer on that page, but it does help me understand a bit better what Tokens are.
Edit: the context windows can be up to 120k in length as per my understanding of the linked page. But still nowhere do I see a maximum length for what a given script can be before needing to break it into multiple files.
It’s around 90k-110k tokens as you need to be able to put instructions and updates in your context besides your file.
Up until recently, files larger than 2000 lines were having context awareness issues. It is recommended to split to around 500 lines if possible, but then you need to make sure they are added to the context.
1 Like
Ooooh okay. So then I should do some research on scripting structure and see about making a file full of functions or classes to help manage some projects? 
We have README, CHANGELOG, FEATURES as separate files which are added for each feature request and are updated as the feature is implemented. Then Cursor also sends the folder structure and can read files by sections or fully in MAX mode.
But if a feature needs to work with other parts of the project, it’s a good idea to manually drag the files into the chat. Also let the LLM start and update the style of the project or feature and don’t change models. Gemini and Claude write different file structures and have different code formatting and naming (CamelCase vs snake_case), if you combine them they will perceive the context as less relevant, but if they are familiar with the style, they will appear to see things correctly that they don’t actually see.
What didn’t work, was comments everywhere (not read if the file is not added, not needed if the code is added), headers with comments that explain the file (not enough explanation).
2 Likes
Thanks for the info! I did switch between Claude and Gemini in my first iteration, but this week since starting over have stuck with Claude 4, and things are working pretty well. Some hiccups, but I am hoping to figure out a way to iron those out.
Thanks again!