[FEATURE] Mods: list dynamic-workflow agents in $.agent.list() and expose their transcripts to session.messages
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet (closest: #24537, an agent-hierarchy dashboard; #91870, the general mods thread)
- [x] This is a single feature request (not multiple features)
Problem Statement
Dynamic-workflow agents "carry ids no list names": their tool.call and turn.complete events carry an agentId, but $.agent.list() does not list them, and $.session.messages({ agentId }) refuses them ("no conversation of agent … in this session: not one of its agents"). A mod that tracks liveness (last progress time, dead-man sweeps), shows agents in a pane, or reads a returned agent's transcript to verify a claim is blind to every agent a workflow spawned, while it sees every Agent-tool subagent.
Proposed Solution
List workflow agents in $.agent.list() with their run id and index (and the same idle/waiting/running states other agents have), and let session.messages({ agentId }) return their transcripts under the same rules as Agent-tool subagents. A workflow field on the listed row would let a mod group them by run.
Alternative Solutions
- Reconstructing liveness from
tool.callevents alone: works while an agent is calling tools, but a stalled agent emits nothing, which is the case liveness exists for. - Reading the run's journal file under the session directory: possible after the fact, not live, and not through the mod API.
Priority
Medium - Would be very helpful
Feature Category
Developer tools/SDK
Use Case Example
- A mod shows a pane with every running agent, its last tool call and the time since it, and warns the orchestrator when one has stalled for 12 minutes.
- An orchestrator starts a dynamic workflow with 16 agents.
- Today the pane shows none of them and the stall warning never fires for them; with this feature they appear like any subagent, grouped under the run.
Environment: Claude Code 2.1.294, macOS 25.3, plugin hooks module (mods). Related: a companion request asks that agent.spawn may rewrite cwd/prompt for workflow agents, and another that a turn.complete hook's text can become the agent() result.