Significantly increase AI tool budgets now that the Verification Harness prevents runaway loops

This commit is contained in:
2026-06-15 17:19:37 -07:00
parent 0f90a21302
commit e88a566609

View File

@@ -53,16 +53,15 @@ type TurnIntent =
const TOOL_BUDGETS: Record<TurnIntent, number> = {
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) =>