No recovery mechanism for abandoned agent tasks

Resolved 💬 4 comments Opened Sep 15, 2025 by ringger Closed Jan 6, 2026

Issue Description

When Claude launches an agent task using the Task tool but after some time, Claude stops waiting and continues with other work, there's no way to retrieve the agent's work or final report. This creates inefficient resource usage and lost computational work.

Steps to Reproduce

  1. Claude launches an agent task using the Task tool with complex, time-consuming work (e.g., systematic codebase analysis)
  2. After some time, Claude stops waiting and continues with other work instead of waiting for completion
  3. Agent completes its work but Claude has no access to the results
  4. No tools available for Claude to retrieve agent output after the fact

Expected Behavior

Claude should be able to:

  • Check if agent tasks are still running
  • Retrieve completed agent reports (similar to how BashOutput works for bash processes)
  • Receive notifications when long-running agents complete
  • Manage agent tasks (list active tasks, retrieve results, etc.)

Current Behavior

  • No tools available to check agent status or retrieve output
  • Agent work is completely lost if Claude stops waiting for initial completion
  • No recovery mechanism available

Impact

  • Wasted computational resources when agents complete valuable work that becomes inaccessible
  • Claude may abandon legitimate long-running analysis tasks
  • Inefficient workflow where Claude duplicates agent work manually

Suggested Solutions

  1. Add TaskOutput tool to retrieve agent results by task ID (similar to BashOutput)
  2. Add TaskStatus tool to check running agent tasks and their progress
  3. Add automatic notifications when agents complete
  4. Improve Task tool documentation about waiting requirements
  5. Consider adding task persistence across Claude Code sessions

Real-World Example

During TRS-80 emulator debugging, Claude launched an agent to systematically search for non-existent method calls across the codebase. This was a legitimate use case requiring thorough analysis. After some time, Claude stopped waiting and continued with manual work, effectively abandoning the agent process. The agent likely completed valuable analysis that became inaccessible, forcing Claude to duplicate the work manually.

Environment

  • Platform: Linux (WSL2)
  • Claude Code session with Task tool and general-purpose agent type
  • Agent tasks run autonomously but lack recovery mechanisms

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗