From 9f6287025c288e2cd687d0bbecd3c8fb4867effa Mon Sep 17 00:00:00 2001 From: t Date: Fri, 21 Aug 2026 14:11:28 -0600 Subject: Keep subagent boards pinned while background workflows run A background subagents.lua workflow outlives the tool call that started it, so settling the outer result unpinned a board whose agents were still working. Track a per-tool-call workflow count and derive the pin from both the tool being active and that count, so the board only returns to transcript order once its last workflow finishes. Also show the reasoning level alongside the model on agent cards. --- subagents/workflow.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'subagents/workflow.lua') diff --git a/subagents/workflow.lua b/subagents/workflow.lua index 97dd858..671890e 100644 --- a/subagents/workflow.lua +++ b/subagents/workflow.lua @@ -767,6 +767,7 @@ local function finish_workflow(record, status, result, err) record.error = err record.coroutine = nil active_workflows[record.id] = nil + progress.workflow_finished(record.tool_call_id) notify(record) end @@ -785,6 +786,7 @@ function M.start(wf, opts) workflow_sequence = workflow_sequence + 1 local id = "workflow-" .. workflow_sequence local record = make_workflow_record(id) + record.tool_call_id = type(opts.tool_call_id) == "string" and opts.tool_call_id ~= "" and opts.tool_call_id or nil workflow_records[id] = record active_workflows[id] = record @@ -823,6 +825,7 @@ function M.start(wf, opts) finish_workflow(record, record.cancel_requested and "cancelled" or "failed", nil, tostring(err)) end end) + progress.workflow_started(record.tool_call_id) return id end -- cgit v1.3