Skip to content

backends: tool-search eligibility ignores other project MCP servers and a resume without the relay #4415

Open

Description

@schlessera

Part of #4278. Deferred from the first review of PR #4394 (#4325, #4306).

Context

  • Tool-search eligibility for a bridged session is decided from the brain module inventory alone (packages/ui-backend-claude/src/sdk-options.ts:448-460).
  • Other project MCP servers still connect in the background. One that announces an always-loaded tool after the first request can add a definition that no tool search referenced.
  • On resume, sdk-options.ts:461-464 checks the inherited origin and the bridge marker, but not that the turn has host inference. A session that loses its relay keeps search on with no base-URL pin.

Scope

Decide and implement the eligibility rule for sessions with other project MCP servers, and require host inference when a retained selection is "true".

Acceptance criteria

  • A keyless test with a slow second project MCP server carrying an always-loaded tool shows that no unreferenced definition is added, or that the session is not search-eligible.
  • A test shows a resumed search-on session without host inference is refused before any provider request.
  • Each test fails on the tree before the change.

Activity

  1. added
    type: fix
    area: backends
    priority: p3
    agent-ready
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: backendspriority: p3type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions