[BUG] Resumed teammates stay bound to the previous team after lead restart; SendMessage to team-lead reports success but messages are never delivered
Status Open
Reported on v2.1.291
Maintainer reply None cached
Activity 2 comments · opened Oct 6, 2026
Environment
- Claude Code 2.1.291, macOS (darwin 25.6.0)
- Lead session with named teammates spawned via the Agent tool (
nameset, in-process teammates)
Summary
After the lead session restarts, teammates resumed with SendMessage to their old agentId remain bound to the previous team. Their SendMessage(to: "team-lead") calls return success ("Message sent to team-lead's inbox"), but the message is written to the old team's inbox file, which the restarted lead no longer reads. The reports are silently lost. Nothing on either side signals a failure.
Steps to reproduce
- In a lead session, spawn several teammates with the Agent tool using
name. They are registered in~/.claude*/teams/session-<A>/config.json. - Restart the lead session (in our case the session was resumed after a rate-limit pause; the transcript continued, but the runtime came back with a new session id).
- The restarted lead gets a new team,
teams/session-<B>/(itsconfig.jsonhasleadSessionId= the new runtime id). - From the restarted lead, resume an old teammate:
SendMessage({to: "<old agentId>", ...}). The tool result says it was resumed "as an in-process teammate with N prior messages". - The resumed teammate works and calls
SendMessage({to: "team-lead", ...}). The result issuccess: true, "Message sent to team-lead's inbox".
Actual
- The message is appended to
teams/session-<A>/inboxes/team-lead.jsonwithread: falseand is never delivered to the lead. - In our session, 17 messages (substantive reports plus idle notifications) from 4 resumed teammates sat unread for ~2 hours. The lead stayed idle, believing it was waiting on them.
- A teammate spawned fresh after the restart joined
session-<B>and its messages were delivered normally, so delivery is fine for current-team members and broken only for resumed ones.
Expected
One of:
- Resuming a teammate rebinds it to the lead's current team, so
to: "team-lead"reaches the live lead; or SendMessagefails (notsuccess: true) when the target inbox belongs to a team whose lead is no longer running; or- The restarted lead also drains inboxes of earlier teams it led (same transcript).
Impact
Unattended multi-agent work stalls silently: the lead waits indefinitely for reports that were already sent. The only recovery is reading the stale inbox JSON by hand.
Related
- #76500 (lost final reports, turn-boundary delays): a different trigger, but the same symptom of a report that
SendMessagesays was sent never arriving. - #71723 (
namesilently switches an agent to the teammate/mailbox path).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗