refactor(background-agent): standardize loop detector null guards

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-12 00:42:52 +09:00
parent 4de02094ab
commit 141798efed
@@ -36,7 +36,7 @@ export function recordToolCall(
settings: CircuitBreakerSettings,
toolInput?: Record<string, unknown> | 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<string, unknown> | null
): string {
if (toolInput === undefined || toolInput === null) {
if (toolInput == null) {
return toolName
}
if (Object.keys(toolInput).length === 0) {