claude-code - 💡(How to fix) Fix Spawned subagents that cannot perform the task they were given (SSH to remote server), wasting session time [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48316Fetched 2026-04-16 07:03:14
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

Severity: MEDIUM — Wasted session time and credits

What happened

Claude spawned two parallel subagents with explicit instructions to SSH into a remote server and read files. Both agents responded that they cannot execute SSH commands, cannot connect to external machines, and cannot run commands outside the local filesystem — wasting the full agent execution time and burning session credits for zero output.

Claude (the parent) already had SSH access and had been successfully running remote commands throughout the session. Delegating SSH tasks to subagents that cannot perform SSH is an obvious capability mismatch that Claude should recognize before spawning.

Impact

  • Two full agent executions consumed with zero useful output
  • Session time wasted waiting for agents that were guaranteed to fail
  • User frustration at watching time burn on obviously-wrong tool use

Expected behavior

Before spawning a subagent for a task, Claude should verify the subagent type has the capability required. Explore/research subagents do not have SSH/network access. Tasks requiring SSH should be done directly by the parent agent using the Bash tool.

Requested resolution

  • Refund of credits burned on failed subagent executions
  • Fix: Agent tool documentation or runtime should indicate which agent types have network/SSH capability, and Claude should not delegate network-dependent tasks to agents without that capability

extent analysis

TL;DR

Claude should verify the subagent type's capabilities before delegating tasks, ensuring that SSH-dependent tasks are only assigned to agents with network/SSH capability.

Guidance

  • Review the agent tool documentation to understand the capabilities of each subagent type, particularly regarding network and SSH access.
  • Modify Claude's task delegation logic to check the subagent type's capabilities before assigning tasks, preventing the delegation of SSH-dependent tasks to agents without network/SSH capability.
  • Consider implementing a warning or error message when Claude attempts to delegate an SSH-dependent task to an incompatible subagent, to prevent wasted session time and credits.
  • Explore the use of the Bash tool in the parent agent for tasks requiring SSH, as recommended in the expected behavior section.

Example

No code snippet is provided, as the issue does not include specific code details.

Notes

The solution relies on understanding the capabilities of each subagent type and modifying Claude's task delegation logic accordingly. The exact implementation details may vary depending on the specific architecture and codebase.

Recommendation

Apply workaround: Modify Claude's task delegation logic to check subagent capabilities before assigning tasks, and use the Bash tool in the parent agent for SSH-dependent tasks, as this approach addresses the capability mismatch and prevents wasted session time and credits.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Before spawning a subagent for a task, Claude should verify the subagent type has the capability required. Explore/research subagents do not have SSH/network access. Tasks requiring SSH should be done directly by the parent agent using the Bash tool.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Spawned subagents that cannot perform the task they were given (SSH to remote server), wasting session time [1 comments, 2 participants]