diff --git a/vibn-frontend/app/api/chat/route.ts b/vibn-frontend/app/api/chat/route.ts index 0cdf7922..b6582c0e 100644 --- a/vibn-frontend/app/api/chat/route.ts +++ b/vibn-frontend/app/api/chat/route.ts @@ -33,10 +33,10 @@ import { buildCodebaseSummary } from "@/lib/ai/codebase-summary"; import { execInDevContainer } from "@/lib/dev-container"; import type { ChatMessage, ToolCall } from "@/lib/ai/gemini-chat"; -// C-01: Lowered from 15 → 8. Real workflows (scaffold → install → -// configure → start) rarely need more than 16 rounds when done correctly. -// If the cap IS hit the model gets a recovery summary, not silence. -const MAX_TOOL_ROUNDS = 30; +// C-01: Raised to 60. Provides a massive engineering runway for complex coding +// tasks (like complete mobile-responsive styling), while the State-Based +// Governor acts as our real-time safetynet against loops. +const MAX_TOOL_ROUNDS = 60; let chatTablesReady = false; async function ensureChatTables() {