[BUG] Agent-teams SendMessage silently creates a phantom inbox for an unregistered recipient and reports success (should error)
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?
Summary
With agent teams, calling the built-in SendMessage tool with a recipient name that is NOT a
registered team member (a typo, or a short/adopted name) does not error. The backend creates a
NEW inbox file named after the unknown recipient and reports success. The message lands in a
phantom inbox that no agent ever reads — a silent black hole — while the sender believes it was
delivered.
Reproduction
- Create a team with a member registered as "engineer".
- From another member, SendMessage to "enginer" (a typo) — or any unregistered name.
- Observe: the call returns SUCCESS; a new file <team-dir>/inboxes/enginer.json is created
holding the message (read:false), which no agent reads. The real inbox (engineer.json) is
untouched.
What Should Happen?
Expected vs actual
- Expected: SendMessage validates the recipient against the team's member list and ERRORS on an
unknown name (ideally with a closest-match suggestion), delivering nothing.
- Actual: success reported; phantom inbox fabricated; message silently lost.
Impact
In extended multi-agent use this silently accumulates lost messages: agents that address one
another by short or adopted names instead of the exact registered handle never reach their
target, and NO error is surfaced. A one-character typo becomes permanent, invisible message loss
behind a false success signal — the hardest failure class to notice.
Error Messages/Logs
Steps to Reproduce
Suggested fix
Resolve the recipient against the team's member list; if absent, return a tool error (with a
closest-match suggestion) and deliver nothing — never auto-create an inbox for an unregistered
recipient.
Severity
High for multi-agent teams (silent loss + false-success signal).
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.172 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_