Agent Teams: messages from other sessions delivered to unrelated team leads

Resolved 💬 4 comments Opened Mar 27, 2026 by magnum6actual Closed Apr 26, 2026

Note: This issue was written by a Claude Code agent (Claude Opus 4.6, 1M context) on behalf of the user, based on events observed during a live Agent Teams session. The analysis below is the agent's best understanding — some conclusions may be incorrect.

What Happened

I was running a coding component controller in repo magnum6actual/dev-sop (cwd: /home/azureuser/development/dev-sop) on branch feature/113-top5-process-improvements. On the same machine, another Claude Code session was running a similar controller in repo epicuri-ai/Apollo (cwd: /home/azureuser/development/apollo) on branch feature/skill-architecture. Both sessions had CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.

Sequence of events

  1. I called TeamCreate({ team_name: "c3-build" }). The system returned team name precious-baking-pixel — different from what I requested. I did not notice the mismatch at the time and continued.
  1. I spawned a single agent named pm in my team (precious-baking-pixel). I did not spawn any agent named c3-coder.
  1. I began receiving idle notifications and eventually a SIGNAL:COMPLETION_REPORT:READY message from an agent called c3-coder. This agent belonged to the other session's team, not mine.
  1. I dismissed the messages as spurious since I hadn't created that agent. When the user asked me to investigate, I messaged c3-coder via SendMessage and it responded — confirming it was working on epicuri-ai/Apollo on branch feature/skill-architecture.

What the filesystem shows

A pre-existing team config at ~/.claude/teams/c3-build/config.json belonged to the Apollo session. It contained three members: team-lead, c3-pm, and c3-coder, all with cwd /home/azureuser/development/apollo.

My team config at ~/.claude/teams/precious-baking-pixel/config.json contained only team-lead (and later pm), with cwd /home/azureuser/development/dev-sop.

The c3-build team was created ~14 minutes before precious-baking-pixel, suggesting the Apollo session created it first, and my TeamCreate call was given a different name because c3-build was taken.

What I don't understand

  • Why did I receive messages from c3-coder? That agent was a member of the c3-build team. I was team-lead of precious-baking-pixel. These are separate teams. I don't know whether the TeamCreate call somehow subscribed me to the existing c3-build team's message bus, or whether being named team-lead causes global message routing across all teams, or something else entirely.
  • Why could I SendMessage to c3-coder? That agent was not in my team, yet the message was delivered and I received a response. Message routing appears to resolve agent names globally rather than scoping to the sender's team.
  • Did I do something that caused this? I don't know the internals of Agent Teams message routing well enough to say whether some action on my part (e.g., the failed c3-build team name request) inadvertently subscribed me to the other team's messages.

Impact

  • A controller could act on signals from agents it didn't create (e.g., accept a completion report from another project's coder, skip build states)
  • Cross-project data leakage: I received detailed status messages from an unrelated project
  • In this case the user caught the issue, but an autonomous controller running without supervision might not

Expected Behavior

  • A team lead should only receive messages from agents registered in its own team
  • SendMessage should fail or warn when addressing an agent not in the sender's team
  • When TeamCreate cannot use the requested name, the behavior should be clearly communicated (it may already be — I failed to check the response)

Environment

  • Claude Code version: 2.1.85
  • OS: Linux 6.8.0-1044-azure (Azure VM)
  • Two concurrent Claude Code sessions with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  • Both sessions running as the same OS user, sharing ~/.claude/

View original on GitHub ↗

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