SendMessage to idle agent spawns new instance instead of waking existing one

Resolved 💬 3 comments Opened Apr 9, 2026 by cbockenstette-commits Closed May 23, 2026

Bug

SendMessage to an idle agent creates a new agent instance instead of waking the existing one. Each follow-up message doubles the running agent count.

Steps to Reproduce

  1. Spawn an agent via Agent(name: "my-agent", prompt: "do task")
  2. Wait for agent to complete (goes idle)
  3. Call SendMessage(to: "my-agent", content: "give me your full output")
  4. Observe: new agent_spawned event — a fresh instance is created
  5. The new instance hangs indefinitely

Expected Behavior

SendMessage should wake the idle agent and deliver the message to the existing instance, as documented in TeamCreate docs.

Actual Behavior

A new agent instance is spawned. The original idle agent remains untouched. The new agent hangs indefinitely (observed: 6+ minutes with no response).

Impact

  • Exponential agent proliferation on follow-up messages
  • Indefinite hangs requiring manual intervention
  • Makes teammate-message-based workflows (content retrieval from completed agents) unusable

Environment

  • Claude Code CLI
  • Observed: 2026-04-08

View original on GitHub ↗

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