Subagents (Agent tool) cannot reach the LSP tool, contradicting documented MCP/tool inheritance

Open 💬 3 comments Opened Jul 9, 2026 by sean-abbott

Description

The LSP tool (provided via the official LSP plugins, e.g. pyright-lsp@claude-plugins-official, rust-analyzer-lsp@claude-plugins-official, clangd-lsp@claude-plugins-official) is available and fully functional in the main conversation thread, but is completely unreachable from any subagent spawned via the Agent tool — built-in or custom, regardless of tools/disallowedTools configuration.

This contradicts the sub-agents documentation, which states:

Subagents inherit the internal tools and MCP tools available in the main conversation by default.

Repro

  1. Enable an LSP plugin (e.g. pyright-lsp) in settings.json enabledPlugins, in a project with a supported language file.
  2. In the main thread, confirm the tool is reachable:

``
ToolSearch({query: "select:LSP", max_results: 5})
`
→ returns the full
LSP function schema, and calling it (e.g. operation: "documentSymbol"`) works correctly.

  1. Spawn a plain, unmodified subagent via the Agent tool (e.g. subagent_type: "general-purpose", no custom .claude/agents/*.md override, no tools/disallowedTools restriction) and have it run the identical call:

``
ToolSearch({query: "select:LSP", max_results: 5})
`
→ returns
"No matching deferred tools found"`.

Also reproduced with a custom subagent definition at .claude/agents/Explore.md (overriding the built-in Explore agent by name) using a disallowedTools denylist that does not mention LSP — same result, LSP is absent from that subagent's ToolSearch results.

Expected

Per the documented default, a subagent with no explicit tool restriction on LSP should be able to find and call it via ToolSearch, the same as the main thread.

Actual

LSP is never present in a subagent's deferred-tool registry, in any subagent context tested (built-in general-purpose, built-in Explore override, no restriction present in tools/disallowedTools).

Impact

This blocks any workflow that wants subagents (e.g. a read-only "Explore"/code-search subagent) to prefer LSP-based code navigation (documentSymbol, hover, goToDefinition, etc.) over grep/text search — the tool is architecturally unavailable to them, so prompt-level instructions to "try LSP first" cannot succeed no matter how the subagent is configured.

Environment

  • Platform: Linux
  • LSP plugins: pyright-lsp@claude-plugins-official, rust-analyzer-lsp@claude-plugins-official, clangd-lsp@claude-plugins-official (all enabled in settings.json)
  • Reproduced via both the top-level Agent tool with subagent_type: "general-purpose" (default config, no overrides) and a custom .claude/agents/Explore.md override

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗