teapot-coding-agent 0.19.6 → 0.19.8

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.
@@ -882,6 +882,19 @@ export class Agent {
882
882
  async loop() {
883
883
  while (!this.stopRequested) {
884
884
  try {
885
+ // stop() aborted the tool signal and nothing re-armed it (only the
886
+ // parkedByTool path ever did), so EVERY tool after a stop returned
887
+ // "aborted (harness shutdown)" until process restart. A new round is
888
+ // new work: give it a live signal (re-arm AND republish — toolCtx
889
+ // holds a copy of the reference).
890
+ if (this.toolAbort.signal.aborted) {
891
+ this.toolAbort = new AbortController();
892
+ this.toolCtx.signal = this.toolAbort.signal;
893
+ }
894
+ // failures from the previous round must not poison this one — the
895
+ // counter only ever reset on success, so a tripped limit re-tripped
896
+ // on the first failure after restart ("6 consecutive" right after start)
897
+ this.consecutiveToolErrors = 0;
885
898
  const turnsAtStart = this.stats.turns;
886
899
  let finished = await this.runTurnsUntilIdle();
887
900
  // the round ended on the per-round turn cap (not finish/stop): tell
@@ -910,7 +923,12 @@ export class Agent {
910
923
  });
911
924
  // the wrap-up nudge IS this round's continuation prompt — starting
912
925
  // another round on top of it would stack a generic auto-continue
913
- // nudge too, so go straight to the next round instead
926
+ // nudge too. BUT this must respect autoContinue: with the toggle
927
+ // off the round simply ENDS here (the old code continued
928
+ // unconditionally and spun an infinite loop on models that never
929
+ // call finish() — turns=16000+ in a mock test).
930
+ if (!this.opts.autoContinue || this.goal.status !== "active" || !this.goal.text.trim())
931
+ break;
914
932
  continue;
915
933
  }
916
934
  if (this.stopRequested)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.19.6",
3
+ "version": "0.19.8",
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",