Skip to content

chatd: archive one child subtree and list descendants from a parent chat #249

Closed

Description

@ibetitsmike

Xum created this issue on behalf of @ibetitsmike.

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.

Activity

  1. added
    enhancement
    pstack-parity
    on Nov 12, 2026
  2. ibetitsmike commented on Nov 12, 2026

    @ibetitsmike
    OwnerAuthor

    Xum posted this comment on behalf of @ibetitsmike.

    Tracked in #255.

  3. ibetitsmike commented on Nov 13, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    Triage (Coder Agents maintainer, 2026-11-13): ready. A workstream started on this issue. Progress and PRs will be posted here.

  4. ibetitsmike commented on Nov 13, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    PR 1 (list descendants with list_agents) merged as #278 (b1a5e2f442). PR 2 (archive one child) is #281, in review.

  5. ibetitsmike commented on Nov 13, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpstack-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions