Skip to content

Hide the 'Run as task' switch for modern-era servers (task creation is server-directed) #2674

Closed

Description

@cliffhall

Problem

On a modern-era (2026-07-28) connection that has negotiated the io.modelcontextprotocol/tasks extension (SEP-2663), the Tools tab's Run as task switch is shown for every tool. It shouldn't be there at all on that era: under SEP-2663, task creation is server-directed. The server decides per request whether to return a task handle. The client has no "run this as a task" request to make, so the switch offers a choice the protocol doesn't have.

The current behavior is deliberate (clients/web/src/components/groups/ToolDetailPanel/ToolDetailPanel.tsx, the showRunAsTask / effectiveRunAsTask block and its NOTE comment). The switch "just declares intent to poll a returned handle". But that intent isn't something the user should have to supply. If the server can return a task for any call, the Inspector should always be ready to handle one.

Proposed change

  • Hide the switch on modern era. Show it only for legacy (2025-11-25) servers that advertise tasks.requests.tools.call, gated on the tool's execution.taskSupport the way it is today (optional → user choice, required → forced on and disabled, forbidden → hidden).
  • Route modern calls without the switch. Today useServerCommands.tsx's callTool picks callToolStream over callTool only when runAsTask is set (or the tool is required). With the switch gone, a modern connection with the tasks extension negotiated has to take the task-capable path for every call, because that path is what declares the extension on the request and makes an unsolicited task handle legal. Otherwise a server-returned task would go unhandled. Before choosing between "always callToolStream on modern" and "make callTool accept a returned handle", check what callTool does with an unsolicited handle today.
  • Remove the modern-specific branches from ToolDetailPanel (modernTasks OR-ing into showRunAsTask / effectiveRunAsTask), and drop the modernTasks prop through ToolsScreen / InspectorView if nothing else needs it.
  • Check whether the TUI and the CLIs have an equivalent per-call task option on modern, and apply the same rule there.

Acceptance

  • Modern server with the tasks extension: no Run as task switch on any tool, and a tool call the server turns into a task still shows up on the Tasks screen with live status and progress, same as today with the switch on.
  • Modern server without the tasks extension: no switch (same as today).
  • Legacy server: behavior unchanged.
  • Update the tests and stories for ToolDetailPanel / ToolsScreen that cover the modern switch.

Related: #1631 (modern-era tasks extension), #1071 / #1118 (earlier "Run as task" visibility issues).

Activity

  1. added this to the v2.11.0 milestone on Oct 12, 2026
  2. cliffhall commented on Oct 12, 2026

    @cliffhall
    MemberAuthor

    Priority score: severity 2 (minor friction: a control the protocol makes meaningless) + urgency 3 (wanted this milestone) + 1 signal (milestoned) = 6 → Medium.

  3. self-assigned this
    on Oct 12, 2026
  4. cliffhall commented on Oct 12, 2026

    @cliffhall
    MemberAuthor

    Shipped in #2687 (merged to v2/main as 4440ea1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature requestv2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions