MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / readLoopAction

Function readLoopAction

src/agent/recovery.ts:119–123  ·  view source on GitHub ↗
(maxIdenticalReads: number)

Source from the content-addressed store, hash-verified

117 * some local servers, crashing the model under sustained load).
118 */
119export function readLoopAction(maxIdenticalReads: number): 'none' | 'summarize' | 'abort' {
120 if (maxIdenticalReads >= 5) return 'abort';
121 if (maxIdenticalReads >= 3) return 'summarize';
122 return 'none';
123}
124
125/**
126 * Detect "stuck" loops in the recent tool-call history. Two shapes:

Callers 2

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected