Skip to content

Deleting a parent task gives no warning that its subtasks are kept and archived #3780

Description

@liuxiaocs7

Problem

Deleting a parent task permanently removes it, but its linked subagent subtasks are intentionally kept and moved to the archive rather than cascade-deleted. This is by design — see #1467 / #3151 — because each subtask session owns its own transcript, artifacts, and outputs, and must not be destroyed as a side effect of deleting the parent.

The delete confirmation never mentions this. Its description only says the task and all of its messages will be permanently removed from disk. After the delete, subtasks that were nested under the parent surface as top-level rows on Settings › 活动 › 已归档任务, labelled 原父任务已删除. With no warning up front and no feedback on completion, this reads as tasks appearing from nowhere — deleting one swarm parent can add up to 32 archived rows at once.

Image

Desired outcome

  • Before I confirm a delete, the dialog tells me the task's N subtasks will be kept and moved to Archived, not destroyed.
  • After the delete, the completion toast tells me how many subtasks were moved to Archived.
  • Deletion semantics are unchanged: subtasks are still preserved and archived, never cascade-deleted.

Alternatives or workarounds

  • Cascade-delete the subtasks together with the parent — explicitly rejected in fix(desktop): archive child sessions whose parent was deleted #1467: a subtask is an independent record with its own outputs, so destroying it as a side effect of deleting the parent is the wrong default.
  • Group orphaned subtasks under a "from deleted task X" section on the archive page — a larger, separate change; a warning plus a completion notice removes the surprise with far less surface.
点击展开中文

问题

彻底删除一个父任务时,它本身被永久移除,但其关联的 subagent 子任务是被有意保留并移入归档、而非级联删除的。这是既定设计(见 #1467 / #3151):每个子任务 session 拥有各自独立的对话记录、产物和输出,不能作为删除父任务的副作用被销毁。

但删除确认框对此只字未提,描述里只说“任务和全部消息会从磁盘上永久移除”。删除后,原本嵌套在父任务下的子任务会在「设置 › 活动 › 已归档任务」里以「原父任务已删除」标签变成顶层行。删除前没有告知、删除后也没有反馈,用户会觉得这些任务凭空冒出来——删除一个 swarm 父任务甚至可能一次多出 32 行。

期望结果

  • 确认删除前,弹窗告知“该任务的 N 个子任务将被保留并移入归档,而不是删除”。
  • 删除完成后,toast 告知有多少个子任务已移入归档。
  • 删除语义保持不变:子任务仍然保留并归档,绝不级联删除。

备选方案

  • 把子任务随父任务一起级联删除——在 fix(desktop): archive child sessions whose parent was deleted #1467 中已被明确否决:子任务是拥有独立产物的独立记录,作为删父副作用销毁并不合理。
  • 在归档页把孤儿子任务折叠成“来自已删除任务 X”的分组——属较大且独立的改动;用“事前警告 + 完成提示”能以更小的改动消除意外感。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions