Title: Google AI Studio Quota Exceeded Bug (Agent execution terminated)

While building an app with the Gemini 3.5 Flash model in Google AI Studio, as soon as the daily limit (Quota exceeded) was reached, the code generation was cut off mid-way, severely corrupting the entire source code and the agent build. Please improve the system immediately so that when the limit is exceeded, it at least safely rolls back to the previous working state or prevents the code from breaking.