diff --git a/packages/cli/src/run.ts b/packages/cli/src/run.ts index 8d18192d96..7b6a424bca 100644 --- a/packages/cli/src/run.ts +++ b/packages/cli/src/run.ts @@ -583,7 +583,7 @@ async function aggregateResults( stats.usage.total_tokens, stats.usage.prompt_tokens, stats.usage.completion_tokens, - host.path.basename(outTrace), + outTrace ? host.path.basename(outTrace) : "", result.version, ] .map((s) => String(s)) diff --git a/packages/cli/src/server.ts b/packages/cli/src/server.ts index ecd4a34e73..2ddb9850f0 100644 --- a/packages/cli/src/server.ts +++ b/packages/cli/src/server.ts @@ -322,9 +322,8 @@ export async function startServer(options: { port: string; apiKey?: string }) { .catch((e) => { if (canceller.controller.signal.aborted) return if (!isCancelError(e)) trace.error(e) - logVerbose( - `\nrun ${runId}: failed with ${errorMessage(e)}` - ) + logError(`\nrun ${runId}: failed`) + logError(e) ws?.send( JSON.stringify(< PromptScriptEndResponseEvent