You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chatd: archive one child subtree and list descendants from a parent chat #249
Part of moving the pstack lead ("Pstack General", Xum workspace 8ac7791132) to a Coder Agents chat on this fork.
Gap
A lead chat runs for days and opens a workstream child for each feature. Today:
No tool archives one child. Worktrees and child workspaces are removed or stopped only when the root chat is archived (docs/fork/pstack-adapter.md, Worktree isolation and Workspace isolation), so they pile up under a root that never ends.
A child that waits on a question (requires_action) or is paused counts toward --chat-max-live-subagents-per-family, and the lead has no way to retire a workstream for good.
list_agents returns direct children only. The lead cannot find a worker's chat ID to read its transcript, because search_chats returns no subagent chats.
In Xum the lead opened 20 workstream workspaces, archived the finished ones with task_workspace_lifecycle, and read any descendant's transcript on disk.
Wanted
A tool for a parent to archive one direct child and its descendants. It interrupts them first, then cleans up their worktrees and stops their workspaces with the same rules as a root archive.
list_agents can list the children of a descendant, or the whole subtree, so read_chat_transcript can reach any family member.
Acceptance
A root with two worktree children archives one. That child's worktree and branch are removed when clean, the other child is untouched, and the root stays open.
A root lists a grandchild's ID and reads its transcript.
Done. PR 1 #278 (list_agents with chat_id and recursive, merged as b1a5e2f442, deployed) and PR 2 #281 (archive_agent, merged as db485236c5). Both run behind experiments already on the daily server (fork-nested-subagents, cleanup behind fork-subagent-isolation). The live check on the deployed server is still to do; the maintainer will use archive_agent to retire finished workstreams.
Activity
ibetitsmike commentedon Nov 12, 2026
Tracked in #255.
ibetitsmike commentedon Nov 13, 2026
Triage (Coder Agents maintainer, 2026-11-13): ready. A workstream started on this issue. Progress and PRs will be posted here.
feat(coderd/x/chatd): list a chat's descendants with list_agents (#278)
ibetitsmike commentedon Nov 13, 2026
PR 1 (list descendants with
list_agents) merged as #278 (b1a5e2f442). PR 2 (archive one child) is #281, in review.ibetitsmike commentedon Nov 13, 2026
Done. PR 1 #278 (
list_agentswithchat_idandrecursive, merged asb1a5e2f442, deployed) and PR 2 #281 (archive_agent, merged asdb485236c5). Both run behind experiments already on the daily server (fork-nested-subagents, cleanup behindfork-subagent-isolation). The live check on the deployed server is still to do; the maintainer will usearchive_agentto retire finished workstreams.