[Bug] LSP tool silently stripped from background subagents without error

Status Open
Reported on v2.1.218
Maintainer reply None cached
Activity 0 comments · opened Jul 24, 2026

Bug Description
Background subagents silently lose the LSP tool (non-allowlisted built-ins stripped without error)

Since v2.1.198, subagents run in the background by default. Per the sub-agents documentation, background subagents keep all MCP tools but only a fixed allowlist of built-in tools (Read, Grep, Glob, Bash, WebFetch, WebSearch, ToolSearch, Skill, …). The LSP tool (ENABLE_LSP_TOOL=1 with the official jdtls-lsp / kotlin-lsp plugins) is a built-in that is not on that allowlist, so it is removed from every default-dispatched subagent — per the docs, "whether inherited or listed in the tools field," and the removal reports no error.

Repro: in a Java or Kotlin project with an LSP plugin enabled, confirm LSP works in the main session (ToolSearch select:LSP loads the tool; documentSymbol/goToDefinition/findReferences/hover all succeed). Dispatch any subagent in the background (the default) and have it run ToolSearch select:LSP → "No matching deferred tools found," while a control like select:WebFetch resolves fine in the same agent. The same probe in a foreground subagent inherits LSP normally.

Impact: any agent guidance encouraging semantic navigation ("use findReferences/goToDefinition instead of grep") is structurally unfollowable in default dispatches. The agent searches for the tool, finds nothing, and silently falls back to text search — with no signal to the user or the coordinator that this happened. The degradation is worst where LSP matters most: Lombok-generated Java members are invisible to text search, and code-review/implementation subagents are precisely the workloads where semantic navigation adds the most value.

Requests (any of these would help):

  1. Add the LSP tool to the background built-in allowlist — it's read-only and high-value for code agents.
  2. Support forcing foreground in agent frontmatter (e.g. background: false) so a definition can guarantee tool availability; today background: true exists but there is no inverse.
  3. At minimum, surface a visible warning when an entry explicitly listed in tools is stripped by the background filter, instead of silent removal.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.218
  • Feedback ID: f84b9fc4-5d6b-4088-a49b-1bd20d36173d

Errors

[]

View original on GitHub ↗