From 2f429aae8468f249dd40baaf815975d5e02b1030 Mon Sep 17 00:00:00 2001 From: t Date: Thu, 3 Sep 2026 07:41:51 -0600 Subject: Show full subagents.lua source when expanded; guide toward templated prompts The expanded progress board capped the executed Lua at 128 lines (and 32KB), so long workflow sources ended in an ellipsis even after Ctrl-O. Expanded now renders the whole source; collapsed still shows the first four lines. Add a "Program, don't transcribe" section to the system guidance so the primary writes shorter sources: one [[template]] with {name} placeholders filled by gsub with a table, loops over data instead of per-child copies, shared system prompts in `agents`, and file references instead of quoted contents. A single templating mechanism is named on purpose to remove choice. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01ETqhv5FVD8Z14BEBsXeHHC --- subagents/progress.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'subagents') diff --git a/subagents/progress.lua b/subagents/progress.lua index fc86935..e079163 100644 --- a/subagents/progress.lua +++ b/subagents/progress.lua @@ -77,7 +77,7 @@ local function source_of(tool_name, input) if type(source) ~= "string" or source == "" then return nil end -- Tabs are stripped to a single space by sanitization, which would flatten -- indented code; widen them first so the listing keeps its shape. - return sanitize_multiline((source:gsub("\t", " "))):sub(1, MAX_PRESENTATION_BYTES) + return sanitize_multiline((source:gsub("\t", " "))) end local function wrap(text, width, emit) @@ -279,9 +279,10 @@ local function body_lines(card, width, collapsed) end -- The executed source, verbatim: real newlines, one rendered row per wrapped --- source line. Collapsed shows the head of it, expanded the whole thing. +-- source line. Collapsed shows the head of it, expanded the whole thing, +-- uncapped: the model wrote it and the user asked to see it. local function source_lines(board, width, collapsed) - local limit = collapsed and COLLAPSED_LINES or MAX_PRESENTATION_LINES + local limit = collapsed and COLLAPSED_LINES or math.huge local out, truncated = {}, false local function add(row) if #out < limit then out[#out + 1] = BODY_INDENT .. row else truncated = true end -- cgit v1.3