Inconsistent generation on going beyond context

Cursor automatically does copy-paste for the follow-up user prompt if the generation goes beyond the context limit. However, I have seen inconsistent outputs on using the prompt if the model was in the middle of generating code. Any recs/best practices for such cases?