diff --git a/internal/cloud/server-code-agent-http.ts b/internal/cloud/server-code-agent-http.ts index 8856b491..d0b3b482 100644 --- a/internal/cloud/server-code-agent-http.ts +++ b/internal/cloud/server-code-agent-http.ts @@ -899,7 +899,7 @@ export function startAgentRunProjectionResume({ options = {}, traceStore = defau void runAgentRunProjectionResumePass({ options, traceStore, logger, batchSize, minAgeMs, offset, reason }) .then((result) => { failed = result?.failed > 0; - nextOffset = result?.scannedSessions >= batchSize ? offset + batchSize : 0; + nextOffset = failed ? offset : (result?.scannedSessions >= batchSize ? offset + batchSize : 0); }) .catch((error) => { failed = true;