Skip to content

DEFAULT_TOOL_LOOP_THRESHOLD

const DEFAULT_TOOL_LOOP_THRESHOLD: 3 = 3

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/GthLangChainAgent.ts:133

EXT-36 — default number of consecutive identical (tool, args) calls before the tool-loop guard fires. Small on purpose: it must catch a genuine no-progress loop (a model re-issuing the SAME call verbatim) while never tripping a legitimate one-off retry (2x). Kept below GS2-36’s coarser error cap (5) because a same-signature repeat is a stronger, more specific loop signal than “an error happened again”.