talon-agent 1.38.0 → 1.38.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "talon-agent",
3
- "version": "1.38.0",
3
+ "version": "1.38.1",
4
4
  "description": "Multi-frontend AI agent with full tool access, streaming, cron jobs, and plugin system",
5
5
  "author": "Dylan Neve",
6
6
  "license": "MIT",
@@ -182,30 +182,26 @@ export async function routeDelivery(
182
182
  return { route: "text-part", chars: responseText.length };
183
183
  }
184
184
 
185
- // Route 4 — empty turn. Surface a concise notice.
185
+ // Route 4 — empty turn. The model produced no text (and didn't end_turn):
186
+ // a genuine empty completion, or a tool-only loop that delivered nothing.
187
+ // Stay SILENT — a "(no reply — model returned no output)" placeholder in
188
+ // the chat is slop; a turn with nothing to say should say nothing, exactly
189
+ // like an explicit silent `end_turn()` (Route 5). We still count and log it
190
+ // for observability so systemic empties remain diagnosable from the logs.
186
191
  if (
187
192
  !state.turnTerminated &&
188
193
  !responseText &&
189
194
  state.deliveredTextNorms.length === 0
190
195
  ) {
191
196
  incrementCounter("scratchpad.empty_turn");
192
- if (onTextBlock) {
193
- try {
194
- await onTextBlock(
195
- state.toolCalls > 0
196
- ? "(no reply model called tools but didn't produce output text)"
197
- : "(no reply — model returned no output)",
198
- );
199
- } catch (err) {
200
- logWarn(
201
- "agent",
202
- `[${chatId}] onTextBlock (empty-turn error) failed: ${errMsg(err)}`,
203
- );
204
- if (propagateDeliveryFailure) {
205
- throw new TextBlockDeliveryError("empty", 0, err);
206
- }
207
- }
208
- }
197
+ logWarn(
198
+ "agent",
199
+ `[${chatId}] empty turn — no output delivered${
200
+ state.toolCalls > 0
201
+ ? ` (model ran ${state.toolCalls} tool call(s) but produced no text)`
202
+ : " (model returned no output)"
203
+ }; sending nothing.`,
204
+ );
209
205
  return { route: "empty", chars: 0 };
210
206
  }
211
207