Feature Request: Provide TaskOutput tool access to sub-agents

Resolved 💬 5 comments Opened Feb 1, 2026 by hughescr Closed Mar 11, 2026

Summary

Sub-agents spawned via the Task tool cannot efficiently wait for background processes because they lack access to the TaskOutput tool that the orchestrator has.

Problem Description

Orchestrator capabilities:

  • Can run Bash({ command: "...", run_in_background: true })
  • Can efficiently block with TaskOutput({ task_id: "...", block: true, timeout: 600000 })
  • Gets notified when task completes

Sub-agent capabilities:

  • Can run Bash({ command: "...", run_in_background: true })
  • Receives task ID and output file path
  • Cannot use TaskOutput - tool is not available
  • Must read output file directly via Read tool
  • No way to block/wait for task completion

Impact

Sub-agents working on tasks that require long-running processes (>10 minute timeout) are forced into inefficient patterns:

  1. Polling loops - Repeatedly sleep and check output file, wasting turns and context
  2. Orchestrator management - Have orchestrator manage background tasks, but this pollutes orchestrator context (defeating the purpose of sub-agents)
  3. Foreground only - Limit all work to ≤10 minutes (the max timeout parameter)

Verified Behavior

Tested with general-purpose sub-agent (which has Tools: *):

  • Confirmed TaskOutput is not in their tool set
  • They have TaskCreate/TaskGet/TaskUpdate/TaskList (task tracking, unrelated)
  • They successfully used Read to get output file contents
  • No blocking mechanism available

Suggested Enhancement

Provide sub-agents access to TaskOutput tool, allowing them to:

TaskOutput({ task_id: "abc123", block: true, timeout: 600000 })

This would enable sub-agents to efficiently handle long-running operations without:

  • Wasting context on polling loops
  • Requiring orchestrator intervention
  • Being limited to 10-minute foreground operations

Environment

  • Claude Code CLI
  • macOS

View original on GitHub ↗

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