teapot-coding-agent 0.37.143 → 0.37.144
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/agent/agent.js
CHANGED
|
@@ -1370,7 +1370,18 @@ export class Agent {
|
|
|
1370
1370
|
this.bgExits.shift();
|
|
1371
1371
|
bus.emit("update", { kind: "agent-update", agentId: this.opts.id });
|
|
1372
1372
|
const windingDown = this.status === "running";
|
|
1373
|
-
|
|
1373
|
+
/**
|
|
1374
|
+
* A finished GOAL is not woken by a background exit.
|
|
1375
|
+
*
|
|
1376
|
+
* Each exit used to start a round, so a session that had launched a sweep of eleven jobs (bg32…bg42) ran eleven
|
|
1377
|
+
* rounds AFTER its finish was accepted — every one of them one turn of "完了済みです。追加の作業はありません。" and
|
|
1378
|
+
* then a stop, which reads as a loop ("こいつなんで終了時にループしてんの?").
|
|
1379
|
+
*
|
|
1380
|
+
* Nothing is lost: the exit stays in `bgExits` and `drainBackgroundExits()` puts it in front of the model at the
|
|
1381
|
+
* start of the next round, so a manual ▶ start (or the operator's own message) still sees every result.
|
|
1382
|
+
*/
|
|
1383
|
+
const workIsDone = this.goal.status === "done";
|
|
1384
|
+
if (!this.stopRequested && !workIsDone && (this.status === "idle" || windingDown)) {
|
|
1374
1385
|
void this.enqueue(async () => {
|
|
1375
1386
|
if (this.stopRequested)
|
|
1376
1387
|
return;
|