Agent tool documentation references SendMessage for subagent resumption, but SendMessage is gated behind Agent Teams flag

Status Fixed / completed
Reported on v2.1.77
Maintainer reply None cached
Activity 15 comments · opened Mar 17, 2026 · closed Jul 1, 2026

🌀 This is Claude (working with Milo)

Summary

The Agent tool description tells the model to use SendMessage({to: agentId}) to continue a previously spawned agent. But SendMessage is only available when CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is enabled. With the flag off (the default), the model is instructed to use a tool it cannot access.

This was introduced in v2.1.77, which removed the resume parameter from the Agent tool in favor of SendMessage.

What happens

  1. The Agent tool description includes: "To continue a previously spawned agent, use SendMessage with the agent's ID or name as the to field."
  2. The Agent tool returns a resumption hint: agentId: abc123 (use SendMessage with to: 'abc123' to continue this agent)
  3. SendMessage does not appear in the tool list or in <available-deferred-tools>
  4. ToolSearch for SendMessage returns no results
  5. The model cannot resume the agent

The model reads its own tool description and confidently tells the user it can resume agents — then discovers it cannot when it tries.

Root cause

SendMessage is part of the Agent Teams toolset, gated behind CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS (disabled by default per the Agent Teams docs). The v2.1.77 migration from resume to SendMessage assumes this tool is universally available, but it is not.

What should change

Either:

  1. Make SendMessage available independently of the Agent Teams flag for the narrow case of subagent resumption, or
  2. Conditionally omit the SendMessage reference from the Agent tool description and agent return values when Agent Teams is disabled

Context

The old resume parameter on the Agent tool had longstanding issues (#11712, #13619, #10856) and was effectively non-functional. Its removal is not the problem — the problem is that the replacement is documented as available when it is not.

Environment

  • Claude Code: 2.1.77
  • macOS 15.4 (Darwin 25.2.0)
  • CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: not set (default/disabled)

View original on GitHub ↗

15 Comments

github-actions[bot] · 5 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/35141
  2. https://github.com/anthropics/claude-code/issues/34750

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

yonatan-genai · 5 months ago

Still an issue on v2.1.85 (macOS, Darwin 24.4.0). SendMessage is referenced in the Agent tool description and return values but not available in tools or deferred tools. ToolSearch returns no results. Fresh agent spawns are the only workaround.

The Agent tool literally says 'use SendMessage with to: agentId to continue this agent' in every agent completion — but the tool doesn't exist without CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS.

yonatan-genai · 5 months ago

Still reproducing on v2.1.85.

Steps:

  1. Spawn a subagent via the Agent tool
  2. Agent returns with agentId: xxx (use SendMessage with to: 'xxx' to continue this agent)
  3. SendMessage is not in the tool list — not as a direct tool, not as a deferred tool (ToolSearch returns nothing)
  4. Attempting to call SendMessage directly returns: Error: No such tool available: SendMessage

The Agent tool's description still references SendMessage ("To continue a previously spawned agent, use SendMessage with the agent's ID or name as the to field"), and every agent result includes the agentId prompt to use it — but the tool literally doesn't exist unless CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is enabled.

Current workaround: spawn fresh agents each time instead of resuming.

maks244 · 5 months ago

Still an issue

benja83 · 4 months ago

It's still happening in 2.1.110

FelixJongleur42 · 4 months ago

getting this just now, after a subagent was blocked due to token limit. This is with portable (native) install under Linux.

SendMessage isn't available in this environment, so I'll spawn a fresh quant-researcher agent with the full RJ-012 context plus the prep work from the blocked run (baseline IDs, payload specs).
sporebattyl · 4 months ago

Confirmed working on v2.1.114 (Linux, native install) with this workaround:

Shell-level env var export — not settings.json.

# ~/.config/claude-desktop/secrets.env (or anywhere sourced early in .bashrc)
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

Restart Claude Code. ToolSearch("select:SendMessage") now returns the full schema; SendMessage(to: "<agentId>", message: "...") resumes the agent with full context.

Why settings.json env doesn't work: the Agent Teams gate is evaluated during module init, before settings.json is parsed. By the time the env field lands in process.env, the gate has already decided SendMessage isn't registered. Shell export is the only thing that gets the var into the process before init.

Gotcha: if you put the export in ~/.bashrc, make sure it's above the interactive-shell guard (case $- in *i*) ;; *) return ;; esac) — otherwise bash -lc/non-interactive launches won't see it. Sourcing from secrets.env near the top of .bashrc works for all shell modes.

From binary analysis of 2.1.114: gate is env var OR --agent-teams CLI flag AND GrowthBook flag tengu_amber_flint (defaults to true, and there's no client override path for it). So the env var alone is sufficient.

runfence · 3 months ago

Still not fixed?

theycallmeswift · 3 months ago

Encountered this today as well

SpaceyKasey · 2 months ago

Still an issue, encountered this today

betovildoza · 2 months ago

Since the SendMessage tool never worked, I had disabled it from my harness, but today I wanted to see if there was an issue with it. I read this, went to Claude's website and found this, added it to my settings.json, restarted VSC (because I use the extension), and my orchestrator was able to send messages.

https://code.claude.com/docs/en/agent-teams#enable-agent-teams

<img width="781" height="399" alt="Image" src="https://github.com/user-attachments/assets/8c0f9cd6-e77c-497b-b6e4-f63dd5cb320f" />

<img width="413" height="400" alt="Image" src="https://github.com/user-attachments/assets/fa6a25df-12c6-4ba3-9bd8-035873dd2e4f" />

runfence · 2 months ago

@betovildoza , did you even read the previous messages in this issue?

yonatan-genai · 2 months ago

The point is that your workaround is the workaround that’s already well
established in this issue.

On Tue, 9 Jun 2026 at 10:49 betovildoza @.***> wrote:

betovildoza left a comment (anthropics/claude-code#35240) <https://github.com/anthropics/claude-code/issues/35240#issuecomment-4657418753> @runfence <https://github.com/runfence> I read several issues, But I only commented here because it seemed more active; there was an update yesterday or today that changed several things, so I took the opportunity to look for information about it. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/35240?email_source=notifications&email_token=ARWBSX3TYA7ZTJDSVJAXIDD4666QRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVG42DCOBXGUZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4657418753>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARWBSX3BMICE2VNZEEXZS5D4666QRAVCNFSM6AAAAACWUKQJSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMNJXGQYTQNZVGM> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/ARWBSX7WCBJWXPY3M2EH6HT4666QRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVG42DCOBXGUZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android <https://github.com/notifications/mobile/android/ARWBSX6QXW4OUZCYQM65ZFL4666QRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVG42DCOBXGUZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today! You are receiving this because you commented.Message ID: @.***>
yonatan-genai · 2 months ago

Exactly, don’t comment useless things.

On Tue, 9 Jun 2026 at 11:02 betovildoza @.***> wrote:

betovildoza left a comment (anthropics/claude-code#35240) <https://github.com/anthropics/claude-code/issues/35240#issuecomment-4657554474> I'm not saying anything new, I'm just supporting the solution. I had the problem a long time ago, but today I searched, found the issue, confirmed the sources, and commented. Don't comment useless things, what's been done here is useful. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/35240?email_source=notifications&email_token=ARWBSX3XYB7LF27EO2KRPML467AAHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVG42TKNBUG42KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4657554474>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARWBSX3A7YEJZOZJOPA3G6L467AAHAVCNFSM6AAAAACWUKQJSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMNJXGU2TINBXGQ> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/ARWBSXZUKGWRRGD43YKTQND467AAHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVG42TKNBUG42KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android <https://github.com/notifications/mobile/android/ARWBSX6MWZI7VINGABETAKL467AAHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRVG42TKNBUG42KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today! You are receiving this because you commented.Message ID: @.***>
milobird · 2 months ago

Looks like this has finally been fixed! 🎉