Concurrent sub-agents fail to spawn | Pressing `Esc` throws “Cannot read properties of undefined (reading 'message')”

Resolved 💬 2 comments Opened Jul 14, 2025 by edlsh Closed Nov 30, 2025

Environment

  • Platform: Anthropic API
  • Claude CLI version: 1.0.51 (Claude Code)
  • Operating System: macOS 15.5 (Apple Silicon)
  • Terminal: Ghostty

Bug Description

Attempting to launch multiple concurrent sub-agents results in only one agent spawning. No task-list UI appears, and pressing Esc—which should return to a fresh prompt—crashes the CLI.

Steps to Reproduce

  1. Start an interactive session:

``bash
claude
``

  1. Enter a prompt that should spawn several sub-agents (e.g. Run three parallel searches on …).
  2. Observe that only a single agent starts and no task list is shown.
  3. Press Esc to return to the prompt.

Expected Behavior

  • All requested sub-agents spawn concurrently.
  • A task-list UI displays each agent’s status.
  • Pressing Esc cleanly returns to an empty prompt without errors.

Actual Behavior

  • Only one agent spawns.
  • No task list is rendered.
  • Pressing Esc crashes the CLI with the stack trace below:

<details>
<summary>Stack trace</summary>

ERROR  Cannot read properties of undefined (reading 'message')

   file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2512:798
   -  (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2512:798)
   -     at Array.filter (<anonymous>)
   - Object.renderToolUseProgressMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2512:763)
   - Object.renderToolUseRejectedMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2512:2307)
   - L_2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1968:3008)
   - $w (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19804)
   - gP (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42569)
   - vP (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38118)
   - VL (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38046)
   - mw (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:37900)

</details>

Additional Context

  • Reinstalling the CLI (npm install -g @anthropic-ai/claude-code) did not resolve the issue.
  • Issue reproduces in both fresh and existing projects.
  • Tried the following flags without success:
  • --delegate
  • --parallel-dirs
  • --multi-agent
  • --parallel-focus
  • --concurrency <n>
  • The same prompts and flags worked 100% of the time on earlier CLI versions, so this appears to be a regression.

EDIT: I manually downgraded to 1.0.48 and the issue did not reproduce itself.

View original on GitHub ↗

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