diff --git a/safety.lua b/safety.lua index b8f3e4f..d033c8d 100644 --- a/safety.lua +++ b/safety.lua @@ -362,7 +362,17 @@ function M.norris_step(ctx, model_cfg, helpers, opts) local max_steps = opts.max_steps or 8 local cfg = opts.cfg - helpers.render_step(step_n, max_steps) + -- Phase 10 / #89: when the cloud preplanner emitted a TASK list + -- at :norris launch, surface the current task as the per-step + -- descr so the user sees `─ step k/M ─ ` in real time. + -- ctx.norris_tasks is nil when preplan is disabled / failed → + -- descr falls through to nil → renderer prints just the step bar + -- (existing behavior). + local task_descr + if ctx.norris_tasks and ctx.norris_tasks.list then + task_descr = ctx.norris_tasks.list[ctx.norris_tasks.current] + end + helpers.render_step(step_n, max_steps, task_descr) -- (1) one broker round-trip — stream text + collect tool_calls. --