From 85b8e85569cd3ba68ebd9ac9c53381f48cbb0762 Mon Sep 17 00:00:00 2001 From: Gab Date: Sun, 12 Apr 2026 14:06:00 +1000 Subject: [PATCH] Bump to 1.0.30: increase DOOM_LOOP_THRESHOLD from 3 to 30 in processor.ts --- packages/tfcode/package.json | 2 +- packages/tfcode/src/session/processor.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/tfcode/package.json b/packages/tfcode/package.json index 2fef6e32a..4cb6f62ca 100644 --- a/packages/tfcode/package.json +++ b/packages/tfcode/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.0.29", + "version": "1.0.30", "name": "@toothfairyai/tfcode", "type": "module", "license": "MIT", diff --git a/packages/tfcode/src/session/processor.ts b/packages/tfcode/src/session/processor.ts index b5e9993a3..e0e257f6c 100644 --- a/packages/tfcode/src/session/processor.ts +++ b/packages/tfcode/src/session/processor.ts @@ -18,7 +18,7 @@ import { PartID } from "./schema" import type { SessionID, MessageID } from "./schema" export namespace SessionProcessor { - const DOOM_LOOP_THRESHOLD = 3 + const DOOM_LOOP_THRESHOLD = 30 const log = Log.create({ service: "session.processor" }) export type Info = Awaited> @@ -201,7 +201,7 @@ export namespace SessionProcessor { // STOP the loop - do not execute the tool again blocked = true throw new Error( - `Verification loop detected: Tool "${value.toolName}" called 3+ times with ${isSimilarLoop ? "similar" : "identical"} parameters. Move to next step or ask for guidance.`, + `Verification loop detected: Tool "${value.toolName}" called 30+ times with ${isSimilarLoop ? "similar" : "identical"} parameters. Move to next step or ask for guidance.`, ) } }