Bug Report: Gemini 3.1 Pro Preview — Infinite “Working” Loop in Canvas/Code Mode (5000+ seconds)
Forum: AI Developer Community / Google AI Studio Bug Reports
Category: Bug Report
Severity: High
Date: February 2026
Summary
Gemini 2.5 Pro Preview gets stuck in an infinite “Working” loop when generating large multi-file projects in Canvas/Code mode. The generation ran for over 5,298 seconds (~88 minutes) without completing or returning an error.
Environment
-
Model: Gemini 2.5 Pro Preview (labeled as “Gemini 3.1 Pro Preview” in UI)
-
Interface: Google AI Studio — Canvas / Code Mode
-
Framework selected: Next.js
-
Session type: New project generation
-
Date of occurrence: February 2026
Steps to Reproduce
-
Open Google AI Studio → New Canvas/Code project
-
Select model: Gemini 2.5 Pro Preview
-
Select framework: Next.js
-
Add detailed System Instructions (multi-file project context)
-
Paste a large prompt requesting a full production-ready Next.js website with:
-
40+ files
-
Bilingual routing (/tr and /en)
-
Multiple pages, components, contexts, data files
-
Framer Motion animations
-
Tailwind CSS + Glass Morphism design
-
-
Click Run
-
Model begins generating files one by one (visible in file list with
checkmarks) -
After generating ~20 files successfully, model enters “Working” state
-
Generation never completes — stuck indefinitely
Expected Behavior
-
Model should complete generation and return all files
-
OR stop and return a partial result with a message explaining the limitation
-
OR throw a timeout error with guidance
Actual Behavior
-
Status bar shows: “Running for 5298s” with spinner
-
UI shows “Working” indefinitely
-
No error message displayed
-
No timeout triggered
-
No way to resume or export completed files
-
Only option is to manually stop — losing all context
Files Successfully Generated Before Freeze
components/sections/ServicesPreviewSection.tsx ✅
components/sections/PortfolioPreviewSection.tsx ✅
components/sections/ContactCTASection.tsx ✅
app/tr/page.tsx ✅
app/en/page.tsx ✅
app/tr/hakkimizda/page.tsx ✅
app/en/about/page.tsx ✅
app/tr/hizmetler/page.tsx ✅
app/en/services/page.tsx ✅
app/tr/hizmetler/[slug]/page.tsx ✅
app/en/services/[slug]/page.tsx ✅
app/tr/portfoy/page.tsx ✅
app/en/portfolio/page.tsx ✅
app/tr/blog/page.tsx ✅
app/en/blog/page.tsx ✅
app/tr/blog/[slug]/page.tsx ✅
app/en/blog/[slug]/page.tsx ✅
Model froze after generating 17+ files and never proceeded to remaining files.
Impact
-
Large project generation is completely unusable in Canvas mode
-
No partial export option available when stuck
-
Forces users to restart session and lose all progress
-
Wastes significant compute time on both user and Google’s side
Workaround (Partial)
Breaking the prompt into smaller chunks (e.g., generate components first, then pages separately) reduces the chance of freezing — but this should not be required for a production-grade AI tool.
Suggested Fix
-
Implement a hard timeout (e.g., 5 minutes) with a clear error message
-
Allow partial export of already-generated files before timeout
-
Show a progress indicator with estimated remaining files
-
Add resume capability so generation can continue from where it left off
-
Display a warning when prompt complexity may exceed generation limits
Additional Notes
-
The model performed well on individual file generation
-
Quality of generated code (before freeze) was high
-
Issue appears to be a context/generation length limit not being handled gracefully
-
Similar issues have been reported with other large code generation tasks