opencode-auto-resume 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13036,6 +13036,11 @@ var AutoResumePlugin = async (ctx, options) => {
|
|
|
13036
13036
|
return;
|
|
13037
13037
|
}
|
|
13038
13038
|
if (isHallucinationLoop(sid)) {
|
|
13039
|
+
const hasActiveTool = await checkSessionHasActiveTool(sid);
|
|
13040
|
+
if (hasActiveTool) {
|
|
13041
|
+
await log("debug", `Session ${short(sid)} has active tool, skipping hallucination abort`);
|
|
13042
|
+
return;
|
|
13043
|
+
}
|
|
13039
13044
|
await log("warn", `Hallucination loop detected on ${short(sid)} \u2014 aborting instead`);
|
|
13040
13045
|
await tryAbortAndResume(sid, w);
|
|
13041
13046
|
} else {
|
|
@@ -13101,6 +13106,12 @@ var AutoResumePlugin = async (ctx, options) => {
|
|
|
13101
13106
|
if (w.lastRetryAt > 0 && elapsedSinceRetry < requiredBackoff)
|
|
13102
13107
|
return false;
|
|
13103
13108
|
if (isHallucinationLoop(sid)) {
|
|
13109
|
+
const hasActiveTool = await checkSessionHasActiveTool(sid);
|
|
13110
|
+
if (hasActiveTool) {
|
|
13111
|
+
await log("debug", `Session ${short(sid)} has active tool, skipping hallucination abort`);
|
|
13112
|
+
w.lastRetryAt = now;
|
|
13113
|
+
return false;
|
|
13114
|
+
}
|
|
13104
13115
|
await log("warn", `Hallucination loop on ${short(sid)}! Aborting...`);
|
|
13105
13116
|
return await tryAbortAndResume(sid, w);
|
|
13106
13117
|
}
|
|
@@ -13220,7 +13231,11 @@ var AutoResumePlugin = async (ctx, options) => {
|
|
|
13220
13231
|
}
|
|
13221
13232
|
const idle = now - w.lastActivityAt;
|
|
13222
13233
|
if (idle >= chunkTimeoutMs + gracePeriodMs) {
|
|
13223
|
-
|
|
13234
|
+
const hasActiveTool = await checkSessionHasActiveTool(sid);
|
|
13235
|
+
if (hasActiveTool) {
|
|
13236
|
+
await log("debug", `Session ${short(sid)} has active tool call, skipping stall recovery`);
|
|
13237
|
+
w.lastSubagentCheckAt = now;
|
|
13238
|
+
} else if (w.resumeAttempts < maxRetries) {
|
|
13224
13239
|
tryResume(sid, w, "Stream stall");
|
|
13225
13240
|
} else if (!w.gaveUp) {
|
|
13226
13241
|
w.gaveUp = true;
|
package/package.json
CHANGED