From 141798efed411f874b126ce8afff411b3e6f3a0b Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 12 Apr 2026 00:42:52 +0900 Subject: [PATCH] refactor(background-agent): standardize loop detector null guards Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/features/background-agent/loop-detector.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/background-agent/loop-detector.ts b/src/features/background-agent/loop-detector.ts index ecfcf23f3..6120a168c 100644 --- a/src/features/background-agent/loop-detector.ts +++ b/src/features/background-agent/loop-detector.ts @@ -36,7 +36,7 @@ export function recordToolCall( settings: CircuitBreakerSettings, toolInput?: Record | null ): ToolCallWindow { - if (toolInput === undefined || toolInput === null) { + if (toolInput == null) { return { lastSignature: `${toolName}::__unknown-input__`, consecutiveCount: 1, @@ -78,7 +78,7 @@ export function createToolCallSignature( toolName: string, toolInput?: Record | null ): string { - if (toolInput === undefined || toolInput === null) { + if (toolInput == null) { return toolName } if (Object.keys(toolInput).length === 0) {