[BUG] Aborted() crash when custom agent spawns another agent via Task tool

Resolved 💬 3 comments Opened Feb 3, 2026 by james-b-kelly Closed Mar 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code crashes with Aborted() when a custom agent (defined in ~/.claude/agents/) uses the Task tool to
spawn another custom agent. The crash occurs consistently and is not related to the specific agent content -
I've recreated the agents from scratch simpler prompts and the same thing happens.

  • Asking Claude directly to implement something (Claude may use agents internally) - works fine
  • Using built-in agent types (Explore, Plan, etc.) - works fine
  • Custom agents that don't spawn other agents - works fine
  • Any custom agent that uses Task tool to spawn another custom agent - crashes
  • Tested with multiple agent configurations
  • Recreated agents from scratch with different names - same crash
  • Changed model from opus to sonnet for nested agent - same crash
  • The crash appears to be in the agent spawning mechanism, not in the agent content itself

What Should Happen?

The orchestrator agent should successfully spawn the implementer agent, receive its output, and continue
processing.

Error Messages/Logs

The last entries in the debug log before crash show:                                                         
  [DEBUG] Stream started - received first chunk                                                                
  [DEBUG] High write ratio: blit=600, write=997 (62.4% writes), screen=32x100                                  
                                                                                                               
  Then the log simply ends - no error, no stack trace.

Steps to Reproduce

  1. Create a custom agent that uses the Task tool to delegate to another custom agent:
  ~/.claude/agents/orchestrator.md:                                                                            
  ---                                                                                                          
  name: orchestrator                                                                                           
  model: sonnet                                                                                                
  color: purple                                                                                                
  ---                                                                                                     
                                                                                                               
  You coordinate work by delegating to the implementer agent.      
  Use the Task tool with the `implementer` agent to do implementation work.                                                                                                                                                   
                                            
  ~/.claude/agents/implementer.md:                                                                             
  ---                                                                                                          
  name: implementer                                                                                            
  model: sonnet                                                                                                
  color: blue                                                                                                  
  ---                                                                                                                                                                                                            
  You implement features and fix bugs.                                          
  1. Ask Claude to use the orchestrator agent (either directly or by asking it to do something that triggers

it)

  1. When the orchestrator agent attempts to spawn the implementer agent via Task tool, Claude Code crashes

with Aborted()

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

It worked this morning - before the Claude went down.

Claude Code Version

2.1.29

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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