From e88a566609f2c7e88d4981a12b5e3b5410b18e1f Mon Sep 17 00:00:00 2001 From: mawkone Date: Mon, 15 Jun 2026 17:19:37 -0700 Subject: [PATCH] Significantly increase AI tool budgets now that the Verification Harness prevents runaway loops --- vibn-frontend/app/api/chat/route.ts | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/vibn-frontend/app/api/chat/route.ts b/vibn-frontend/app/api/chat/route.ts index e5fa7ee1..019bcc5b 100644 --- a/vibn-frontend/app/api/chat/route.ts +++ b/vibn-frontend/app/api/chat/route.ts @@ -53,16 +53,15 @@ type TurnIntent = const TOOL_BUDGETS: Record = { conversational: 1, // Must be at least 1 so the LLM gets called for a text reply - // Investigative questions ("is the auth connected?", "what's the test user?") - // routinely need to read several files THEN synthesize an answer. Budgets of - // 5/8 were cutting these off at the cap before the model could answer - // (telemetry showed 100% round_cap on these turns). Raised so a read-only - // investigation can actually finish. - status_check: 16, - diagnose: 22, - small_fix: 18, - feature_build: 40, - deploy: 25, + // With the Verification Harness and Anti-Stall Governor now unconditionally enabled, + // we no longer need to rely on artificially tight tool budgets to prevent infinite loops. + // The system will intelligently halt if it detects a stall or unfixable error, so we can + // safely give the AI a massive runway to complete complex tasks. + status_check: 40, + diagnose: 60, + small_fix: 40, + feature_build: 80, + deploy: 40, autonomous: 150, }; @@ -1507,13 +1506,7 @@ export async function POST(request: Request) { const mutated = assistantToolCalls.some((tc) => MUTATION_TOOLS.includes(tc.name), ); - if ( - - !aborted && - mutated && - activeProject?.id && - activeMcpToken - ) { + if (!aborted && mutated && activeProject?.id && activeMcpToken) { emit({ type: "phase", phase: "verify", label: "Verifying & fixing" }); const previewUrl = extractPreviewUrl(messages); const verifyExec: ToolExecutor = async (name, args) =>