WebSearch built-in tool returns an empty result envelope inside subagents (2.1.177)

Open 💬 0 comments Opened Jun 14, 2026 by vstandos

Summary

When the built-in WebSearch tool is invoked from inside a subagent (Task/Agent), it consistently returns an empty result envelope — the query is echoed back but zero sources are attached:

Web search results for query: "<query>"


REMINDER: include sources in your response

The same tool works normally in the top-level session. This is not the permission-denied case in #46250 — there is no denial message; the call "succeeds" with no results.

Environment

  • Claude Code 2.1.177 (Linux / WSL2)
  • Reproduces on a subagent pinned to native claude-haiku-4-5-20251001 (so it is not a third-party router/proxy stripping the server tool).

Repro

  1. Define a subagent with tools: [WebSearch].
  2. From the main session, dispatch it with any query needing live results (e.g. "current weather in London").
  3. Observe the returned tool_result: query echoed, no web_search_tool_result blocks, zero sources.

Ground truth

Calling the Anthropic web_search server tool directly (same account/credentials, same machine) for the identical query returns 10 real results — so the entitlement and network path are fine. The empty envelope is produced by Claude Code's own WebSearch wrapper in the subagent path: it issues the nested request but the web_search server tool is never actually force-invoked, so the model hands back a tool-call intent instead of executed results.

Related

  • Appears to match the observation in OmniRoute/issues#1882 (internal web_search_20250305 returns a function tool_call instead of results → empty array).
  • Distinct from #46250 (permission denial).

View original on GitHub ↗