Skip to content

[FEATURE]: Sub-agent abort recovery — show task_id and allow retry #24756

@Ithril-Laydec

Description

@Ithril-Laydec

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem
When a sub-agent is aborted (connection drop, crash, Ctrl+C, or system shutdown), the TUI shows "Tool execution aborted" with no actionable information. The user has no way to:

  1. Identify which child session was running (no task_id / session ID visible)
  2. Resume the aborted sub-agent (no retry action available)
    The child session still exists in the database with its full message history, and the Task tool already supports resumption via task_id — but the UX provides no path to use it.
    This is especially painful for long-running sub-agents (complex implementations, multi-file refactors) where losing 5-10 minutes of work to a transient connection issue is a real problem.
    Current behavior
    ┃ General Task — Implement authentication module
    ┃ Tool execution aborted
    No session ID. No retry option. The user must start over or manually dig through session data.
    Proposed solution
  3. Display task_id on aborted Task tool parts (quick win, ~5 lines)
    The data is already available — metadata.sessionId is preserved by the abort handler in processor.ts (it spreads existing metadata and adds interrupted: true). The Task component in session/index.tsx just doesn't render it in the error state.
    ┃ General Task — Implement authentication module
    ┃ └ task_id: ses_0191a3b4c5d6AbCdEfGhIj
    ┃ Tool execution aborted
    This alone makes manual recovery possible (user can tell the parent agent to resume with that ID).
  4. "Retry" action on aborted Task tool parts (the real feature)
    A keybind (e.g., r when focused on an aborted tool part) that re-invokes the Task tool call with the same parameters plus task_id injected automatically. The child session continues where it left off and the result flows back to the parent naturally.
    This approach:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions