[BUG] Agent teams (interactive only): SendMessage to a busy teammate is withheld until its turn ends, so mid-task corrections arrive after the work is done
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet (closest: #50779, auto-closed as stale without a fix; #58180, closed as its duplicate — details below)
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code (2.1.288)
What's Wrong?
In an interactive session with agent teams, a SendMessage from the team lead to a busy teammate is not shown to that teammate until the teammate's whole turn ends (stop_reason=end_turn). While the teammate is in a chain of tool calls, the message waits — so a correction sent mid-task arrives only after the teammate has finished the work the correction was meant to stop.
The same scenario in headless mode (claude -p) delivers the message at the teammate's next tool round, as documented. The behaviour depends on the mode, not the version:
| Mode | Version | Lead sent message | Teammate saw it |
|---|---|---|---|
| interactive | 2.1.288 | before tool call 1 returned | after all 8 tool calls + its final reply (64 s later) |
| interactive | 2.1.283 | before tool call 1 returned | after all 8 tool calls + its final reply (66 s later) |
| -p | 2.1.288 | before tool call 1 returned | after tool call 1 |
| -p | 2.1.283 | before tool call 1 returned | after tool call 1 |
The SendMessage tool description tells the model the opposite of the interactive behaviour: "messages enqueue and drain at the receiver's next tool round". So the lead believes its correction has been seen when it has not.
Impact: an orchestrator cannot redirect a teammate. Whenever the human reverses a decision mid-task, the teammate finishes a full turn on the stale brief before seeing it — wasted tokens, then rework.
What Should Happen?
A message to a busy teammate is shown to it at its next tool round in interactive mode, as it already is in -p mode and as the SendMessage tool description states — e.g. appended to the next tool_result turn.
Error Messages/Logs
# Teammate transcript (subagents/agent-*.jsonl), interactive, 2.1.288. Timestamps UTC.
# Lead transcript: Agent spawn 00:51:43, SendMessage 00:51:44.
00:51:43 user <teammate-message teammate_id="team-lead"> (the brief)
00:51:47 assistant tool_use call 1
00:51:53 user tool_result
00:51:56 assistant tool_use call 2
... (calls 3-7, no message shown between any of them)
00:52:41 assistant tool_use call 8
00:52:47 user tool_result
00:52:48 assistant text: "done." <- turn ends
00:52:48 user <teammate-message teammate_id="team-lead" summary="STOP the ..."> <- first delivery
00:52:51 assistant tool_use echo "GOT MESSAGE ..."
# The probe's own log:
call 1 20:51:53
...
call 8 20:52:47
GOT MESSAGE 20:52:51
Steps to Reproduce
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1(settings have"teammateMode": "in-process").- Start an interactive session in an empty directory:
claude --model haiku --allowedTools Bash Agent SendMessage -- "$(cat prompt.txt)", whereprompt.txtis:
````
Timing test, minimal commentary. Step 1: spawn a NAMED teammate called probe (Agent tool, name: probe, model: haiku) with this exact prompt: 'Make exactly 8 separate Bash calls one at a time, each: python3 -c "import time;time.sleep(6)"; echo "call N $(date +%T)" >> /tmp/probe.log (N=1..8). If you receive a message from team-lead, do what it says instead. When done reply: done.' Step 2: IMMEDIATELY after spawning, SendMessage to probe: 'STOP the loop now. Run one Bash call: echo "GOT MESSAGE $(date +%T)" >> /tmp/probe.log then end your turn.' Step 3: end your turn.
- Wait about 60 s, then
cat /tmp/probe.log.
- Actual (interactive):
call 1…call 8, thenGOT MESSAGE. - Expected:
call 1, thenGOT MESSAGE.
- Run the same prompt with
claude -p --model haiku --permission-mode bypassPermissions "...": the log showscall 1thenGOT MESSAGE, the correct behaviour.
Costs well under $0.10 per run on Haiku.
Claude Model
Not sure / Multiple models (repro above on Haiku; hit daily with Opus as lead)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.288 (Claude Code) — also reproduced on 2.1.283
Platform
Anthropic API
Operating System
Other Linux (NixOS)
Terminal/Shell
Other (Alacritty, zsh)
Additional Information
- #50779 ("inbox messages to team lead deferred until stop_reason=end_turn"): the same mechanism, reported for the lead's inbox with a filesystem-level repro, and independently reproduced outside Agent Teams in its comments. Auto-closed as stale on 2026-07-26, not fixed, now locked.
- #58180 ("Deliver teammate messages mid-turn"): closed as a duplicate of #50779, so it is closed too.
- This report adds that the defect also hits the teammate side, persists on 2.1.288, and is interactive-only:
-pdelivers correctly on the same versions, which points at the interactive delivery path rather than the inbox itself. - The 2.1.288 changelog entry about held cross-session messages concerns session-to-session delivery, not in-process teammates; the behaviour above is unchanged by it.