teapot-coding-agent 0.37.2 → 0.37.3

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.
@@ -3819,7 +3819,27 @@ export class Agent {
3819
3819
  if (call.function.name === "report_progress") {
3820
3820
  await this.recordProgress(call.function.arguments);
3821
3821
  }
3822
- this.messages.push({ role: "tool", tool_call_id: call.id, content: "progress recorded" });
3822
+ /**
3823
+ * EVERY tool call needs a `tool` message, but only `report_progress` was a report.
3824
+ *
3825
+ * This loop used to answer `"progress recorded"` to whatever the model called, so a `bash`
3826
+ * invocation came back with the text "progress recorded" and `durationMs: 0` — it never ran.
3827
+ * MEASURED in this session (seq 62247/62248): the assistant turn carried exactly one tool
3828
+ * call, `bash <npm view polling loop>`, and its result was `"progress recorded"`, while the
3829
+ * very next `progress` row read "(no report produced)". The command's real output appeared
3830
+ * only on the NEXT turn, which is what made it look like a stray duplicate.
3831
+ *
3832
+ * The model did nothing wrong: it was asked for a progress report and chose to run its work
3833
+ * instead. Answering that call with the report text both lies to the model (the tool result
3834
+ * is its only view of what happened) and drops the command's output.
3835
+ *
3836
+ * A non-report call is answered with a plain acknowledgement — it is NOT executed here,
3837
+ * because this path has no tool context and must not run side effects a second time. The
3838
+ * round then continues and the model sees that it still owes a report.
3839
+ */
3840
+ const isReport = call.function.name === "report_progress";
3841
+ const answer = isReport ? "progress recorded" : "not run — this turn was a progress request";
3842
+ this.messages.push({ role: "tool", tool_call_id: call.id, content: answer });
3823
3843
  // log both sides so restores replay the exact exchange (meta-style)
3824
3844
  await this.log.append("tool_call", this.currentSession, this.currentBranch, {
3825
3845
  callId: call.id,
@@ -3830,9 +3850,10 @@ export class Agent {
3830
3850
  await this.log.append("tool_result", this.currentSession, this.currentBranch, {
3831
3851
  callId: call.id,
3832
3852
  name: call.function.name,
3853
+ // a not-run answer is not a FAILURE, so `ok` stays true — the row must not read as an error
3833
3854
  ok: true,
3834
3855
  durationMs: 0,
3835
- result: "progress recorded",
3856
+ result: answer,
3836
3857
  });
3837
3858
  }
3838
3859
  if (!reported && !(res.message.content ?? "").trim()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.2",
3
+ "version": "0.37.3",
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",