From fe6351d7b42329476c509dd76051596e2ab54a15 Mon Sep 17 00:00:00 2001 From: mawkone Date: Mon, 15 Jun 2026 16:02:33 -0700 Subject: [PATCH] Ensure thinking payloads fall through to standard prose formatting --- vibn-frontend/app/api/chat/route.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vibn-frontend/app/api/chat/route.ts b/vibn-frontend/app/api/chat/route.ts index 1fd7d8d1..593804a8 100644 --- a/vibn-frontend/app/api/chat/route.ts +++ b/vibn-frontend/app/api/chat/route.ts @@ -1744,7 +1744,10 @@ export async function POST(request: Request) { } catch { const fallback = buildHealthStatus({ loopBreakReason, - hitRoundCap: maxToolRounds > 0 && round >= maxToolRounds, + // If the loop was forcibly aborted by the user typing a new message mid-flight, + // we don't want to falsely claim we hit the tool-round cap. We only hit the cap + // if aborted is false. + hitRoundCap: !aborted && maxToolRounds > 0 && round >= maxToolRounds, lastError: extractLastToolFailure(messages), toolCount: assistantToolCalls.length, });