claude-code - 💡(How to fix) Fix [BUG] SendMessage tool referenced in Agent tool documentation but not available at runtime [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47021Fetched 2026-04-13 05:43:36
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

Error Messages/Logs

Code Example

Query: "select:SendMessage"                                                                                                                                            
  Result: "No matching deferred tools found"
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Agent tool documentation states:

▎ "To continue a previously spawned agent, use SendMessage with the agent's ID or name as the to field — that resumes it with full context. A new Agent call starts a
▎ fresh agent with no memory of prior runs."

However, SendMessage is not available as a tool at runtime — neither as a direct tool nor as a deferred tool loadable via ToolSearch.

Environment

  • Claude Code version: 2.1.104
  • Model: claude-opus-4-6
  • Platform: Linux (WSL2) — Linux 6.6.87.2-microsoft-standard-WSL2
  • Interface: CLI

What Should Happen?

Expected Behavior

SendMessage should be available as a tool to resume a previously spawned agent, preserving its full conversation context as documented.

Actual Behavior

SendMessage is not available. The only way to interact with agents is Agent(), which always starts fresh. The agent's accumulated context (file reads, grep results,
analysis) is effectively lost after it delivers its report.

Error Messages/Logs

Query: "select:SendMessage"                                                                                                                                            
  Result: "No matching deferred tools found"

Steps to Reproduce

Steps to Reproduce

  1. Spawn a background agent using Agent() — it completes and returns an agentId
  2. Attempt to continue the conversation with that agent using SendMessage
  3. SendMessage does not exist in the available toolset
  4. Using ToolSearch with query select:SendMessage returns: "No matching deferred tools found"
  5. The only option is Agent() which creates a new agent with no context from the previous one

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.104

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Environment

  • Claude Code version: 2.1.104
  • Model: claude-opus-4-6
  • Platform: Linux (WSL2) — Linux 6.6.87.2-microsoft-standard-WSL2
  • Interface: CLI

Impact

  • Tokens wasted when needing to ask follow-up questions to an agent (must re-explore from scratch)
  • The documented workflow of spawning an agent, getting results, then asking follow-ups is broken
  • Misleading documentation creates false expectations about agent lifecycle

extent analysis

TL;DR

The most likely fix is to update the documentation to reflect that SendMessage is not a available tool or to provide an alternative method for resuming a previously spawned agent.

Guidance

  • Verify that the documentation is up-to-date and accurate, as the issue seems to be a discrepancy between the documented behavior and the actual behavior.
  • Check if there are any other tools or methods that can be used to resume a previously spawned agent, as the current implementation of Agent() starts a new agent with no context.
  • Consider reaching out to the developers or maintainers of Claude Code to report the issue and ask for clarification on the intended behavior of SendMessage.
  • Review the code and documentation for any other potential inconsistencies or misleading information.

Notes

The issue seems to be a documentation error or a missing feature, rather than a bug in the code. The fact that SendMessage is not available as a tool, despite being documented as such, suggests that there may be a discrepancy between the intended behavior and the actual implementation.

Recommendation

Apply workaround: Until the issue is resolved, users can try to find alternative methods for resuming a previously spawned agent, such as using a different tool or workflow. However, this may not be possible without further clarification from the developers.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING