Repository navigation
[P24] tasks: SEP-1686 and SEP-2663 on server and client - #347
Merged
Merged
Conversation
Tasks for tools/call, with one model and two wire forms. At 2025-11-25
(SEP-1686) the client asks for a task with the task parameter and reads
the outcome with tasks/result. At 2026-07-28 (SEP-2663, the
io.modelcontextprotocol/tasks extension) the server decides, tasks/get
inlines the outcome, and the client answers input with tasks/update.
Server: withTasks(_:) serves the task methods, and a tools/call handler
returns runAsTask { task in ... }. The server reads each tool's
execution.taskSupport from the tools/list handler, gates the call, and
creates a task only when the client can use one. A TaskManager runs the
work over a TaskStore (InMemoryTaskStore), with limits, an optional
principal, expiry, status notifications, task progress and taskIds on
listen streams. Capabilities are derived for each revision, and
tools/list drops execution except at 2025-11-25. At a task limit, a
required tool or a 2025-11-25 call with task gets -32603 before the
work; other calls run inline. A task whose creating call was cancelled
is cancelled.
Client: Configuration.tasks opts in. callTool drives a returned task to
its result at either revision: it polls, answers input through
tasks/update or the tasks/result stream, and throws
TaskCancelledError for a cancelled task. TaskHandle and the low-level
task calls are public. A late answer to a cancelled tools/call that
names a task gets tasks/cancel.
The everything-server serves the tools of the tasks-* scenarios, so
the default-leg baseline is empty. The interop matrix gains a tasks
profile, and a TypeScript SDK driver and task server at 2025-11-25.
fuzz.sh builds with --disable-build-manifest-caching, so the fuzz build
sees new MCP sources. design/tasks.md and the guides describe it.
- Server reads tool schemas and task support from the tools/list handler once per tools/call, under the caller's context, instead of keeping the first caller's view for every later caller: a tool listed only for some callers was refused or never ran as a task for them. The header check and the task check of one call share the pass, a failed pass costs one walk per call, and cancelling the call cancels the walk (checked between pages). Server.stop() no longer touches the removed cache; it still cancels running handlers. - TaskManager reclaims expired running tasks before a limit refuses a call, so expired tasks no longer hold the limit forever. - waitUntilFinished returns once its task expired, and change waits end at the task's expiry, so tasks/result for an expired task answers -32602 instead of waiting 30 seconds. - Change waiters are keyed by token and removed when the wait ends by timeout or cancellation; expiry and retirement wake and drop them. - tasks/result for a stored task that does not run in this process polls the store at the task's poll interval instead of spinning. - With a principal hook, a caller it returns nil for gets no tasks: none is created (a required tool fails with -32603, others run inline), it sees none and lists none. Callers without a principal no longer share one owner. The everything-server's hook names sessionless callers. - tasks/result releases input it could not deliver because the server stopped or the transport failed, so the next tasks/result sends it again; only an error answer from the client fails the input. Bridged requests rethrow transport errors as they are. - At 2026-07-28 the client reads a task created in a state other than working with tasks/get first: the create result carries no outcome, so a completed task failed and a failed one lost its error. - A tools/call whose send fails, or whose pending request is otherwise dropped, leaves pendingToolCalls. - TaskStore.update documents that it must not add back a task that is not stored. - Updated tests that counted one tools/list pass across calls. - everything-server: the task tool reads its seconds argument with Value.numberValue (main's #226).
- Correct the Mcp-Param-* docs (SEP-2243): a tools/call to a tool hidden for an invalid x-mcp-header annotation is refused with -32020 when it carries arguments or Mcp-Param-* headers. A call with neither has nothing to check and runs; refusing it would cost a tools/list pass on every argument-less call. Updates the doc comment of Server.parameterHeaderError and the server, protocol and troubleshooting guides. No behaviour change. - TaskManager.Configuration.maxActiveTasks and InMemoryTaskStore: document that finished tasks, with their results, stay in the store until their lifetime ends, so maximumTTL (or a store that limits what it keeps) bounds that memory. - tasks/update for an unfinished task that this manager does not run (one a shared store holds for another process) fails with -32603 instead of answering success and dropping the responses, which the client then never sends again. - TaskHandle.result(): a connectionClosed or transportError while polling or waiting on tasks/result is rethrown without sending tasks/cancel, so a network failure leaves the task for Client.task(id:) to drive again. Handler errors and cancelling the caller still cancel the task. - Server: a 2025-11-25 task that expires before it finishes emits no last change, so its notifiedTasks entry stayed until stop(). The server keeps each task's expiry and forgets expired tasks when it tracks a new one.
- An unknown execution.taskSupport is treated as forbidden on the server, as TaskSupport documents and the client already does. Server compared against .forbidden, so an unknown value acted as optional: at 2026-07-28 the tool ran as a task for a client that declared the extension, and at 2025-11-25 a call with task created one instead of failing with -32601. The tools/list pass now reads an unknown value as forbidden. The server and client guides and design/tasks.md say so. - Client.detachConnection forgets the task state of the connection: the tools' task support, the pollers' wakeups and the notified tasks. A TaskHandle.result() waiting between polls slept until its poll timer (up to maximumPollInterval) and then failed with "Client connection not initialized"; it now ends at once with the connection's error, so a connectionClosed or transportError still leaves the task for Client.task(id:) to drive again. A wait that starts after the connection closed throws connectionClosed. After a reconnect, callTool no longer adds task for a tool the previous server listed as task-capable, until listTools runs on the new connection. - Keep data: URL strings as written in a task's result. TaskManager converted a work's result and complete(_:with:)'s result with Value(_:), which turns "data:,hello" into .data, sent as "data:text/plain;base64,aGVsbG8=" by tasks/get, tasks/result and the 2026-07-28 task notification, while the same tool's inline result keeps the string. These conversions, the notification's snapshot and the re-read of a tasks/update response now use Value.preservingStrings.
This was referenced Nov 25, 2026
varun06
previously approved these changes
Nov 25, 2026
varun06
left a comment
Contributor
There was a problem hiding this comment.
Already reviewed and still looking good.
varun06
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rel/1.0.0in order (previous: P23 (#348) · next: P25 (#346))conformance/p24-tasksconformance/p23-harness(stacked: GitHub retargets this PR torel/1.0.0when the previous part merges)ecaa04btasks: SEP-1686 and SEP-2663 on server and clienta08fd9ftasks: review fixes2b13e8ftasks: second-pass review fixes050807dtasks: third-pass review fixesSummary
Adds tasks for
tools/call. One task model has two wire forms:taskparameter, reads theoutcome with
tasks/result, and can list tasks withtasks/list.io.modelcontextprotocol/tasksextension): the serverdecides,
tasks/getinlines the outcome, and the client answers input withtasks/update.On the server,
withTasks(_:)serves the task methods, and atools/callhandler returnsrunAsTask { task in ... }. The SDK reads each tool'sexecution.taskSupportfrom thetools/listhandler, gates the call, and creates a task only when the client can use one. ATaskManagerruns the work and keeps the tasks in aTaskStore(InMemoryTaskStorebydefault). On the client,
Configuration.tasksopts in, andcallTooldrives a task it getsback to its result at either revision.
TaskHandleis the low-level handle.Every
tasks-*conformance scenario passes: the default-leg baseline goes from 25 serverentries to none. The interop matrix gains a
tasksprofile and a TypeScript SDK driver and taskserver.
Motivation
tasks-*scenarios of the default conformance leg failed with 25 entries; ROADMAP listedtasks as planned for both revisions.
design/tasks.md). An application should write one handler, and the SDK should choose thewire form and the gating for each revision.
interop matrix checks v1 against it in both directions.
Changes
Wire types (
Sources/MCP/Base/TaskTypes.swift, new)TaskStatusandTaskSupport: open structs (RawRepresentable, string literals).TaskSnapshot: the task as the server reports it, in the create result,tasks/getand bothstatus notifications. An internal
generationselects the encoding:ttl/pollIntervaland no outcome for v1;
ttlMs(nullwhen unlimited),pollIntervalMsand the inlinedresultorerrorfor v2. Decoding accepts both forms and records which it read.GetTask(tasks/get),UpdateTask(tasks/update, v2),CancelTask(
tasks/cancel; the task at v1, an empty acknowledgement at v2),GetTaskPayload(
tasks/result, v1),ListTasks(tasks/list, v1).TaskStatusNotification(notifications/tasks/status, v1) andTaskUpdatedNotification(notifications/tasks, v2).TaskMetadata(thetaskrequest parameter),ExtensionID.tasks.Sources/MCP/Server/Tools.swift:Tool.execution(Tool.Execution.taskSupport),CallTool.Parameters.task,CallTool.Result.task. A result that creates a task encodes flatwith
resultType: "task"at v2 and nested undertaskat v1.resultType == "task", or atop-level
taskwithoutcontent, decodes intotask.Sources/MCP/Base/Results.swift:ResultType.task.Sources/MCP/Base/MetaKeys.swift:MetaKey.relatedTask,Metadata.relatedTaskID.Sources/MCP/Base/Versioning.swift:ProtocolProfile.usesTaskAugmentation(2025-11-25 andlater handshake revisions) and
usesTasksExtension(stateless revisions); internaltaskGeneration.Sources/MCP/Base/Subscriptions.swift:SubscriptionFilter.taskIdsand an internalSubscriptionEvent.task, sent asnotifications/tasks.Sources/MCP/Base/Transports/MCPRequestHeaders.swift:Mcp-Namecarriesparams.taskIdoftasks/get,tasks/updateandtasks/cancel.HTTPClientTransportandStatelessHTTPServerTransportuse it.Task manager and store (
Sources/MCP/Server/TaskManager.swift, new)TaskRecord: the stored form. Status, outcome (resultvalue orMCPError), outstandinginputRequests, owner, creating revision, TTL and poll interval. A tool error completes therecord; the v1 snapshot reports it as
failed.TaskStoreprotocol andInMemoryTaskStore.TaskManager(actor): runs the work and keeps state behind the store. One manager servesevery
Serverof a process, because a stateful HTTP transport makes aServerper sessionand a v1 task must outlive the session. While a task runs, an in-memory cache is
authoritative and store writes are serialized, so a
tasks/getright after the create resultfinds the task.
TaskManager.Configuration:defaultTTL(1 hour),maximumTTL(24 hours),pollInterval(1 second),
maxActiveTasks(1000),maxActiveTasksPerPrincipal(100, only with aprincipal),
sendsStatusNotifications(on).Principal: an optional closure that binds each task to its caller. A foreign task reads asunknown (-32602). Without a principal, v1 does not declare
tasks.list.is cancelled.
complete(_:with:)andfail(_:with:)finish a task whose work another system runs, andcancel its work.
cancel(_:)cancels a task.record(id:)reads one.TaskContext: what the work receives.taskID(nilinline),request(the creatingrequest's
HandlerContext),isTask,requestInput(_:),elicit(message:requestedSchema:),reportProgress(_:total:message:),setStatusMessage(_:),untilFinished().requestInputnamespaces keys (key,key#2, ...), so a key is never reused in the task'slife. A
requestInputcall that the work cancels withdraws its requests, and the task returnsto
working.HandlerContext.runAsTask(ttl:pollInterval:_:)andServer.runAsTask(ttl:pollInterval:_:):create a task when the request can use one and run the body inline otherwise.
Rule at a task limit: a
requiredtool, or a v1 call withtask, fails with -32603 before thework starts. Any other call runs inline.
design/tasks.mdgives the reason: a v1 client thatsent
taskcannot read a tool result in reply, and arequiredtool is one its author neverruns inline. The error comes before the work, so a retry is safe.
Server (
Sources/MCP/Server/Server.swift,StatelessRequests.swift)withTasks(_:)registers default handlers for the five task methods. A handler theapplication registered for a task method stays.
Before the
tools/callhandler runs, the server reads the tool'sexecution.taskSupportfrom the
tools/listhandler's output (cached with thex-mcp-headerparameters until thetool list changes) and decides how the call may run:
taskSupportforbiddentaskoptionalrequiredtaskCapabilities are derived per revision. At 2026-07-28,
server/discoverdeclaresextensions["io.modelcontextprotocol/tasks"]and notasksslot. At 2025-11-25,initializedeclares
capabilities.tasks(cancel,requests.tools.call, andlistonly with aprincipal). Before 2025-11-25, no task capability.
tools/listdropsexecutionexcept at 2025-11-25.v2:
tasks/get,tasks/updateandtasks/cancelrefuse an undeclared client with -32021before any lookup.
tasks/resultandtasks/listare removed methods (-32601);tasks/updateis stateless-only. Cancel on a finished task is an acknowledgement.v1:
tasks/resultwaits for the task to finish and returns what the call returned, withrelated-task
_meta, or its JSON-RPC error; a cancelled task gives -32603. Meanwhile itsends the task's input requests on its own stream, with related-task
_meta. A request theclient fails fails the work that waits on it. A request left unanswered because the stream
ended is sent by the next
tasks/result. When the task finishes, delivery stops and theoutstanding requests are withdrawn with
notifications/cancelled.tasks/listpages thecaller's tasks, 100 at a time. Cancel on a finished task is -32602.
Inline on a handshake connection, the work asks for input through server requests. Inline at
2026-07-28 it cannot ask:
requestInputfails with -32021.A
tools/callcancelled after its handler created a task gets no answer, and the servercancels the task: no client knows its id.
Notifications: the manager hands each change to each observer in order. v1: the server that
created the task sends
notifications/tasks/statuson its connection when the status changes,without related-task metadata.
TaskContext.reportProgresssends progress for the call'sprogress token for the task's life (and for the request when the work runs inline); v2 tasks
report no progress. v2: a
subscriptions/listenfilter may nametaskIds. Theacknowledgement keeps the caller's own v2 tasks; a client that did not declare the extension
is refused with -32021. Each change of a named task goes out as
notifications/taskswiththe task as
tasks/getreturns it. A server stops observing onstop().Client (
Sources/MCP/Client/Client.swift,Sources/MCP/Client/ClientTasks.swift, new)Configuration.tasks(Configuration.Tasks,nilby default): poll bounds(
minimumPollInterval100 ms,maximumPollInterval30 s,defaultPollInterval1 s),augmentation,requestedTTL. When set, each 2026-07-28 request declares the extension.Configuration.Tasks.Augmentation(open struct):whenRequired(default),whenSupported,never. At 2025-11-25 the client addstaskonly when the server declarestasks.requests.tools.calland the client listed the tool with a matchingexecution.taskSupport. The client records task support from everytools/list.callTooldrives a returned task withTaskHandle.result(). It pollstasks/getat theserver's interval, within the configured bounds; a task notification ends the wait early,
also when it arrived before the wait.
inputRequestswith the registered handlers throughtasks/update.tasks/resultonce the task waits for input or finished; the server's requests onthat stream reach the same handlers.
isErrorresult). Cancelled:
TaskCancelledError, also when the task is cancelled whiletasks/resultwaits.tasks/cancel.callTooldrives a task also whenConfiguration.tasksisnil.tools/callthe client cancelled arrives and names a task, the clientsends
tasks/cancel.startToolCallreturns a task-creating result as is;task(_:),task(id:),getTask,updateTask,cancelTask,taskResult,listTasks.Conformance fixture (
conformance/everything-server/Tasks.swift, new;main.swift)tasks-*scenarios:greet,slow_compute,failing_job,protocol_error_job,confirm_delete,multi_input,test_tool_with_task.TaskManagerfor every server of the process, poll interval 500 ms. Its principal isthe
Mcp-Session-Idheader, so the fixture declarestasks.listat 2025-11-25.Interop
interop/ts-client/(new):package.jsonpins@modelcontextprotocol/sdk1.32.2 andzod4.1.12, installed with
npm cifrompackage-lock.json.client.mjsruns thetasksprofile on the TypeScript SDK.
server.mjsserves the task tools on the TypeScript SDK'sSEP-1686 runtime, over HTTP (port 3401) and stdio. It has no
protocol_error_joband notest_tool_with_task.interop/swift-client/main.swift: thetasksprofile, ten checks.interop/go-client/main.go,interop/python-client/client.py: thetasksprofile. The Goand Python SDKs have no tasks runtime: they skip the lifecycle checks and run
task-tool-inlineandtask-required-refused.scripts/run-interop.sh: installs the TypeScript SDK into.build/interop/ts, starts theTypeScript server, runs the
taskscells.interop/report.py: thetsSDK and thetasksprofile.
interop/README.md,interop/RESULTS.md: the profile, its checks and the findings.CI
scripts/ci/fuzz.sh: builds with--disable-build-manifest-caching. The fuzz packagedepends on the SDK by path, and with the cached build manifest a source file added to
MCPwas missing from the fuzz build until the scratch directory was cleared.
scripts/ci/interop.shrequiresnode..github/workflows/ci.yml: the macOS interop jobsets up Node 22.
Docs
design/tasks.md(new): the model, the two wire forms, storage and work, the handler API,serving each revision, notifications, the client, alternatives and open questions.
design/design.mdindexes it.docs/src/server.src.md,docs/src/client.src.md: a Tasks section each, with snippets(
Examples/Snippets/{Server,Client}/Tasks.swift) that the snippet tests run at bothrevisions.
docs/src/protocol.src.md:taskIdson listen streams and the task error codes.docs/src/rough_edges.src.md: both task items are implemented. Generateddocs/*.mdandREADME.mdare rewoven.ROADMAP.md: tasks move from "Planned" to implemented.CHANGELOG.md: tasks among the 1.0.0features.
docs/src/migration.src.md: tasks among the opt-in features.CLAUDE.md: the codelayout.
Diagram
2026-07-28 (v2): the server decides.
sequenceDiagram participant C as Client participant S as Server participant M as TaskManager C->>S: tools/call, _meta declares io.modelcontextprotocol/tasks S->>S: read execution.taskSupport from tools/list S->>M: create the task and start the work S-->>C: resultType task, taskId, ttlMs, pollIntervalMs loop until the task is terminal C->>S: tasks/get (Mcp-Name is the taskId) S-->>C: status working, or input_required with inputRequests opt input_required C->>S: tasks/update with inputResponses S->>M: record the answers, the work resumes end end S-->>C: tasks/get, status completed, result inlined2025-11-25 (v1): the client asks.
sequenceDiagram participant C as Client participant S as Server C->>S: initialize S-->>C: capabilities.tasks (cancel, requests.tools.call) C->>S: tools/call with task ttl S-->>C: result with task, status working C->>S: tasks/get S-->>C: status input_required C->>S: tasks/result S-->>C: elicitation/create with related-task _meta, on the tasks/result stream C->>S: elicitation result S-->>C: notifications/tasks/status, status working S-->>C: tasks/result answer, the call result with related-task _metaAPI changes
Added
TaskStatusworking,inputRequired,completed,failed,cancelled;isTerminalTaskSupportforbidden,optional,requiredTaskMetadatataskrequest parameter (ttl)TaskSnapshotcallToolResult,createdDate,lastUpdatedDateGetTask,UpdateTask,CancelTask,GetTaskPayload,ListTasksMethodtypesTaskStatusNotification,TaskUpdatedNotificationNotificationtypesExtensionID.tasksio.modelcontextprotocol/tasksResultType.task"task"MetaKey.relatedTask,Metadata.relatedTaskIDio.modelcontextprotocol/related-taskProtocolProfile.usesTaskAugmentation,usesTasksExtensionSubscriptionFilter.taskIdsinitparameterTool.execution,Tool.ExecutioninitparameterCallTool.Parameters.taskinitparameterCallTool.Result.taskinternal(set): set only by the SDKServer.Capabilities.tasks,Server.Capabilities.TaskswithTasksServer.withTasks(_:)TaskManager()HandlerContext.runAsTask(ttl:pollInterval:_:),Server.runAsTask(ttl:pollInterval:_:)TaskContexttaskID,request,isTask,requestInput(_:),elicit(message:requestedSchema:),reportProgress(_:total:message:),setStatusMessage(_:),untilFinished()TaskManagerConfiguration,Principal,store,configuration,init(store:configuration:principal:),record(id:),complete(_:with:),fail(_:with:),cancel(_:)TaskRecordexpiresAt,isExpired(at:)TaskStore,InMemoryTaskStoreClient.Configuration.tasks,Client.Configuration.Tasks,Tasks.AugmentationinitparameterTaskHandleid,initial,snapshot(),update(_:),cancel(),result()TaskCancelledErrortaskID,statusMessageClient.task(_:),task(id:),getTask(_:),updateTask(_:inputResponses:),cancelTask(_:),taskResult(_:),listTasks(cursor:)Changed
Client.callTool(name:arguments:meta:)taskat 2025-11-25 peraugmentationClient.startToolCall(name:arguments:meta:)tasklikecallTool; returns a task-creating result as isRemoved: none.
Behavior changes
tools/listresponses omitexecutionexcept at 2025-11-25.withTasks: atools/callto arequiredtool is refused before its handler for aclient that cannot use tasks (-32601 at 2025-11-25, -32021 at 2026-07-28), and a 2025-11-25
call with
taskto a tool that does not allow tasks gets -32601.withTasks: the server declares tasks per revision (server/discoverextension at2026-07-28,
capabilities.tasksat 2025-11-25, nothing earlier).requiredtool or a 2025-11-25 call withtaskgets -32603 before thework; other calls run inline.
tools/callcancelled after its handler created a task gets no answer, and its task iscancelled.
callToolreturns the task's outcome instead of a result without content whenthe server answers with a task. A late answer to a cancelled
tools/callthat names a taskgets
tasks/cancel.Configuration.tasksset, each 2026-07-28 request declaresio.modelcontextprotocol/tasksin its client capabilities.Server.Configuration.maxResourceSubscriptionsalso caps the task ids of one listen stream.Conformance
Baseline entries (server / client):
--spec-version 2025-11-25--spec-version 2026-07-28tasks-*scenarios(
tasks-capability-negotiation,tasks-dispatch-and-envelope,tasks-lifecycle,tasks-mrtr-composition,tasks-mrtr-input,tasks-request-headers,tasks-request-state-removal,tasks-required-task-error,tasks-wire-fields).change.
Interop
tasks: 22 cells. Totals: 127 client-server cells (was 105), 1811 checks (was1569), 19 failures (was 11).
TypeScript client against it at 2025-11-25, and every client against the TypeScript task
server at 2025-11-25; HTTP and stdio each.
task-create,task-input,task-partial-input,task-tool-error,task-protocol-error,task-cancel,task-mrtr-composition(2026-07-28),task-list(2025-11-25),
task-tool-inline,task-required-refused.polling, input on the
tasks/resultstream, a tool error as a failed task, cancellation,listing). Every check that depends on the Swift SDK passes.
task-required-refusedagainst the TypeScript server, for everyclient. A
tools/callwithouttaskto a tool withtaskSupport: "required"comes back asan
isErrortool result whose text names -32601 (to the Go client, which sends noarguments, a -32603 error). 2025-11-25 says the server MUST answer -32601. The READMErecords this as a TypeScript server bug.
Tests
Tests/MCPTests/TaskTests.swift(new), suites:results,
tasks/updateparameters,Tool.execution, profiles,Mcp-Name, related-taskmetadata.
methods, cancel, outcomes, input through
tasks/update, unique keys, TTL, a cancelled callthat created a task, withdrawn input,
complete(_:with:), limits, principals, aninput-required round that ends in a task.
Mcp-Namemust carry the task id.cancellation, poll bounds, augmentation, low-level calls.
tasks/result, input on its stream,withdrawal on cancel,
tasks/listpaging and visibility.2025-11-25 on, for every revision from 2024-11-05 to 2026-07-28.
taskIdson listen streams, a notification that wakes the client's poll.tasks/cancel.Examples/Tests/{Server,Client}SnippetTests.swift: the task snippets at both revisions.ecaa04b,swift testpasses 981 swift-testing tests inMCPTestsand 104 snippet tests on macOS, and 1069 tests on Linux (scripts/ci-linux.sh build-test).Review notes
Task(it would shadowSwift.Task):TaskSnapshot,TaskRecord,TaskHandle,TaskContext.CallTool.Result.taskhas an internal setter. A handler cannot hand a task to a client thatcannot use one:
runAsTaskdecides.Tool.executiondecodes withtry?: a malformedexecutionreads as absent (forbidden).waiters stay in memory. After a restart, the owner of a durable store marks working tasks
failed.
only
maxActiveTasksapplies. There is no session default: it would break v1 tasks read froma new session, and 2026-07-28 has no sessions.
tasks/resultstream, as the TypeScript SDK does; sending italso on the GET stream or stdio would duplicate JSON-RPC ids.
and the SEP-2663 SHOULD that lets 2026-07-28 clients read 2025-11-25 tasks. The SDK reads a
task only at its own generation.
tasks/listpages from the full list each time: fine for the in-memory store, a scan forlarge stores.
interop/RESULTS.mdnames3aa22e7as the lastSources/change: a commit from before thisPR was squashed.
--checkcompares the result rows, not the header.Verification
interop/RESULTS.md.scripts/ci/run-jobs.sh --strictand on Linuxscripts/ci-linux.sh --strict allpassevery job, the fuzz targets included.
AI usage disclosure: the changes, the tests, the commit messages and this description were written with Claude Opus 5.5 and reviewed by the authors.