Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(scripts): correct scenario runner to handle empty input gracefully

Steven Enamakel5a7e5f449d4b
diff --git a/scripts/life-scenarios/run.mjs b/scripts/life-scenarios/run.mjs
index 1d711652ac..a2bbfe97c5 100644
--- a/scripts/life-scenarios/run.mjs
+++ b/scripts/life-scenarios/run.mjs
@@ -669,6 +669,13 @@ async function sendDesktopTurn({ core, events, clientId, threadId, message, opts
if (outcome === "timeout")
return { error: `turn did not emit chat_done within ${opts.turnTimeoutMs}ms`, requestId, toolCalls };
+ if (done && done.event === "chat_error")
+ return {
+ error: `chat_error (${done.error_type || "unknown"}): ${String(done.message || "").slice(0, 300)}`,
+ requestId: requestId || done.request_id || null,
+ toolCalls,
+ };
+
return {
reply: (done && (done.full_response || done.response)) || "",
usage: done && done.usage,