diff --git a/src/commands/run.ts b/src/commands/run.ts index c6cc31b..50d43db 100644 --- a/src/commands/run.ts +++ b/src/commands/run.ts @@ -118,8 +118,11 @@ function reporter(options: RunCommandOptions): RunnerEvents { ? pc.red("gate FAIL") : pc.green("done") : pc.red("ERROR"); + const duration = typeof run.durationMs === "number" && run.durationMs > 0 + ? ` · ${pc.dim(`${(run.durationMs / 1000).toFixed(1)}s`)}` + : ""; const resume = run.sessionId ? pc.dim(` · resume: claude --resume ${run.sessionId}`) : ""; - console.log(` ${icon} ${status} · ${pc.dim(`$${run.costUsd.toFixed(2)}`)}${resume}`); + console.log(` ${icon} ${status} · ${pc.dim(`$${run.costUsd.toFixed(2)}`)}${duration}${resume}`); }, onGateFail(_stepId: string, feedback: string) { diff --git a/src/core/runner.ts b/src/core/runner.ts index 9d93ad7..7b5a4a1 100644 --- a/src/core/runner.ts +++ b/src/core/runner.ts @@ -16,6 +16,7 @@ export interface StepRun { gatePassed?: boolean; costUsd: number; sessionId: string | undefined; + durationMs?: number; } export interface RunResult { @@ -128,6 +129,7 @@ export async function runLoop(loop: LoopConfig, options: RunOptions): Promise