<feed xmlns='http://www.w3.org/2005/Atom'>
<title>panto-subagents.git/init.lua, branch main</title>
<subtitle>Subagents and dynamic workflows extension for panto
</subtitle>
<id>https://code.tjp.lol/panto-subagents.git/atom?h=main</id>
<link rel='self' href='https://code.tjp.lol/panto-subagents.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/'/>
<updated>2026-09-03T13:57:03Z</updated>
<entry>
<title>Show full subagents.lua source when expanded; guide toward templated prompts</title>
<updated>2026-09-03T13:57:03Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-09-03T13:41:51Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=2f429aae8468f249dd40baaf815975d5e02b1030'/>
<id>urn:sha1:2f429aae8468f249dd40baaf815975d5e02b1030</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01ETqhv5FVD8Z14BEBsXeHHC
</content>
</entry>
<entry>
<title>Let the host fit extension header rows</title>
<updated>2026-08-26T14:37:15Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-26T14:01:36Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=eeb3499f58fa909df7074e689c0f029c59ea767f'/>
<id>urn:sha1:eeb3499f58fa909df7074e689c0f029c59ea767f</id>
<content type='text'>
Return inventory entries as styled text chunks and remove the extension's
byte-counting wrapper. The host now owns display-width measurement,
wrapping and padding for these rows.
</content>
</entry>
<entry>
<title>Discourage active waiting for background workflows</title>
<updated>2026-08-25T21:18:34Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-25T21:18:34Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=ab829fbcbbac3c50ece8e67953b024710d4b1bc6'/>
<id>urn:sha1:ab829fbcbbac3c50ece8e67953b024710d4b1bc6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add workflow cancellation controls</title>
<updated>2026-08-21T17:26:48Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-21T17:26:48Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=49a6001dde72622df9410b738322e9a23e68ddee'/>
<id>urn:sha1:49a6001dde72622df9410b738322e9a23e68ddee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Expose workflow status to other extensions</title>
<updated>2026-08-21T16:44:33Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-21T16:43:08Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=2d4981b3870f2aee75d03006eea6318c501fe47b'/>
<id>urn:sha1:2d4981b3870f2aee75d03006eea6318c501fe47b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Expose a json codec to the subagents.lua sandbox</title>
<updated>2026-08-20T21:32:46Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-20T21:30:59Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=4183fdc7d3667fb4c2af72ff0098c15168c9e950'/>
<id>urn:sha1:4183fdc7d3667fb4c2af72ff0098c15168c9e950</id>
<content type='text'>
Model-authored workflow Lua could reach string, table, math, and utf8 but
had no way to parse an agent's report, so any fan-out over discovered work
had to invent an ad-hoc line format and hand-roll string.gmatch. Hand the
guest panto.ext.json instead. decode returns nil plus a message rather
than raising: the sandbox deliberately has no pcall, so a raising decoder
would let one malformed agent line kill an entire workflow.

Teach the pattern in the injected guidance too: deterministic Lua owns the
loops, counts, ordering, and gates, agents supply discovery and judgment,
and a worker that feeds Lua ends its report with one parseable line. The
existing static-graph example stays; a discover-then-fan-out example joins
it.
</content>
</entry>
<entry>
<title>Add background Lua workflows, inline child prompts, and layered config</title>
<updated>2026-08-20T01:03:52Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-20T01:02:30Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=d1306506aa7f504b0e91c9c6ed7314afbf99978e'/>
<id>urn:sha1:d1306506aa7f504b0e91c9c6ed7314afbf99978e</id>
<content type='text'>
subagents.lua now starts a workflow on its own coroutine and returns a
session-scoped id immediately, so fan-out continues while the primary keeps
working; completion wakes the primary, and later calls read immutable records
from subagents.workflows. Every ctx:agent takes a workflow-unique name so those
records are addressable. A session_start guidance message tells the primary when
to reach for run vs lua.

Children no longer inherit the primary's system context: a child starts from the
fixed child-role instruction plus its profile, and subagents.run/ctx:agent
accept an inline system_prompt instead of a profile. The now-redundant `agent`
form of subagents.models is gone.

Concurrency defaults to five and is configurable through [subagents]
max_concurrent in any layered config.toml; turn boundaries reap only settled
jobs so background workflows survive, while interrupt and session end cancel.

Config roots come from panto.ext.dirs.layers rather than a hand-rolled XDG
lookup, which picks up the base and git-ignored local layers for both agents/
and workflows/.

TOML workflows tighten up: the subagents.workflow tool takes a discovered name
only (inline `steps` duplicated subagents.lua at less power), an optional
top-level `output` array chooses the reported steps and their order instead of
the terminal set, a step with no workflow input gets no empty input heading, and
a workflow naming an undiscovered agent is rejected at discovery rather than
part-way through a run.
</content>
</entry>
<entry>
<title>Fix workflow progress pin lifecycle</title>
<updated>2026-08-18T22:37:40Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-18T22:37:31Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=94e3fd8358bbdb5d6ed81aed475fab7fc73e2097'/>
<id>urn:sha1:94e3fd8358bbdb5d6ed81aed475fab7fc73e2097</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Persist and replay subagent progress across sessions</title>
<updated>2026-08-18T20:20:28Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-18T20:18:14Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=cc69a2e431779528578211a5cb3385bb23e076bf'/>
<id>urn:sha1:cc69a2e431779528578211a5cb3385bb23e076bf</id>
<content type='text'>
Record durable child-turn metadata, restore bounded progress cards during
startup replay, and keep settled cards attached to transcript entries. Add
workflow-local Lua profiles and expose discovered agents and workflows in the
session header.
</content>
</entry>
<entry>
<title>subagents extension on the generic host surfaces</title>
<updated>2026-08-18T02:31:29Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-08-17T02:42:43Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/panto-subagents.git/commit/?id=4f0a91ef55fe96835172bdad34feec1e2a0a0977'/>
<id>urn:sha1:4f0a91ef55fe96835172bdad34feec1e2a0a0977</id>
<content type='text'>
The rock now owns all subagent policy on top of libpanto-lua's generic APIs:
children are ordinary panto.agent instances over rock-constructed stores,
started with agent:run_async and awaited by arming uv.new_poll on each job's
wake_fd from the tool handler's coroutine.

subagents/jobs.lua carries the session policy the host used to own: the
concurrency gate (4 running, FIFO queue, cancel-while-queued never starts),
the await contract (results in input order; "first" returns settled plus
remaining by identity), and settle-time shaping. subagents/spawn.lua seeds
new children (primary system context, child role, profile body with manifest
metadata), resolves model/reasoning through panto.ext.resolve_model, filters
subagents.* out of the inherited tool set via agent:set_tools, and reads
resume defaults back from stored message metadata. One-shot structured
workers are a null_store agent with a declaration-only output tool,
tool_choice forced, dispatch_tools=false. subagents/progress.lua renders
per-tool-entry cards through the component handle's invalidate seam;
turn_interrupt cancels live children, turn_end closes them.

Spec suite rewritten against fakes of the new surfaces (98 cases), including
gate/queue/cancel bounds, resume-default extraction, one-shot capture via
unresolved tool calls, tool filtering, and manifest seeding.
</content>
</entry>
</feed>
