[BUG] ToolSearch loads tools successfully while returning 'tool search not enabled', and is itself missing from the tool list (ENABLE_TOOL_SEARCH=auto, background session)

Status Open
Reported on v2.1.217
Maintainer reply None cached
Activity 2 comments · opened Jul 23, 2026

Environment

Claude Code 2.1.217, Linux, daemon-managed background session (created as a background job, driven via the jobs interface). Global ~/.claude/settings.json has "env": { "ENABLE_TOOL_SEARCH": "auto" }. Large MCP surface (~150 tools across 6 servers), so schema deferral activates.

Observed half-state

  1. Deferral is clearly active: system reminders list dozens of deferred tools as "available via ToolSearch. Their schemas are NOT loaded... Use ToolSearch with query select:..."
  2. ToolSearch itself is NOT present in the model-visible tool list for the session.
  3. Calling ToolSearch anyway (trusting the reminder over the tool list) returns the result string [Tool references removed - tool search not enabled], immediately followed by a Tool loaded. confirmation message. The requested tools ARE actually loaded and fully callable afterward. Verified three times in one session: select:Monitor,TaskStop (both tools worked immediately after), a free-text query, and select:PushNotification. The pattern is deterministic, not flaky: every call produces both the "not enabled" banner and a successful load.

Why this matters

The banner actively misleads the model. In our session the model first concluded (reasonably) that deferred tools were unreachable, and spent hours running fallback implementations (background shell loops instead of Monitor, unable to TaskStop stale tasks) before an experiment revealed that the loader works despite the message. An agent operating under ENABLE_TOOL_SEARCH needs to be able to trust the loader's signals in both directions.

Expected

One coherent state, either:

  • tool search enabled: ToolSearch listed among available tools, results rendered normally, loads work (current loads DO work), or
  • tool search disabled: no deferral reminders pointing at ToolSearch, and calls rejected without side effects.

The current mix (deferral messaging on, tool unlisted, result banner says disabled, load succeeds anyway) is contradictory.

Possibly related

#63754 (ENABLE_TOOL_SEARCH variant mismatch), #78360 (nudge omits the ToolSearch step), #52121 (tools missing from registry under ENABLE_TOOL_SEARCH=true). None describes the works-while-claiming-disabled contradiction.

View original on GitHub ↗

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