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.
@@ -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
- if (!this.stopRequested && (this.status === "idle" || windingDown)) {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.143",
3
+ "version": "0.37.144",
4
4
  "description": "A lightweight, always-on multi-agent harness for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",