Conversation
mcpc now speaks the 2026-07-28 tasks extension ahead of the official SDK, the way the skills extension was done in #401: `tools-call --task/--detach`, `tasks-get`, `tasks-result` and `tasks-cancel` work on servers that declare the extension, mcpc declares it on every request, and a server that answers a plain `tools-call` with a task handle is followed to its result. `tasks-list` shows the tasks the session created, since the extension has no listing. 2025-11-25 servers keep working unchanged. - Extension results are validated by hand-written Standard Schema validators (`src/core/tasks-schema.ts`); a transport shim gets the extension past SDK 2.0.0's era gates, which refuse `tasks/get`/`tasks/cancel` on a modern connection and reject `resultType: "task"` before any result schema runs, and adds the `Mcp-Name: <taskId>` routing header the spec requires - `McpClient` polls `tasks/get` at the server's `pollIntervalMs`, reports failed/cancelled/input_required outcomes in their own words (mcpc never answers `inputRequests`), and treats `tasks/cancel` as the cooperative acknowledgement it is - The bridge keeps a per-session task record for crash recovery and, on 2026-07-28 connections, for `tasks-list`; `--detach` returns the created Task or, when the server ran the call synchronously, the tool result - The modern e2e test server gains an HTTP-level tasks layer (the v2 SDK server refuses the extension's methods too) plus a routing-header probe; sessions/async-tasks now runs in both eras and sessions/tasks-extension covers the extension-only behaviour - Help, README, agent skill, REFERENCE.md and CHANGELOG updated Refs #401 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXvpsSa4d6RkPP4FqhuDak
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Task persistence can lose records, transient errors can erase tasks, and detached x402 retries are broken.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 4
Open (7)
Unwrap detached results for payment challenge detection · New Only prune tasks on explicit unknown or expired errors · New Cap long polling intervals to avoid timer overflow · New Use ttlMs alone to distinguish modern tasks · New Document human versus JSON detach output · New Mention --json for full task details in the guide · New Correct help text claiming detach always returns a task ID · New
What changed in this PR
Adds MCP 2026-07-28 Tasks extension support while retaining legacy task behavior.
Changes:
- Adds task schemas, transport shims, polling, cancellation, and persistence.
- Updates CLI output, help, and documentation.
- Expands unit, E2E, and conformance coverage.
| File | Description |
|---|---|
src/core/tasks-schema.ts |
Validates extension task results. |
src/core/tasks-transport-shim.ts |
Bridges unsupported SDK task behavior. |
src/core/mcp-client.ts |
Implements modern task operations. |
src/core/transports.ts |
Adds task routing headers. |
src/core/protocol.ts |
Adds task-specific diagnostics. |
src/core/extensions.ts |
Registers Tasks extension support. |
src/core/capabilities.ts |
Declares client task capabilities. |
src/lib/types.ts |
Adds cross-era task types. |
src/lib/session-client.ts |
Updates task IPC contracts. |
src/bridge/index.ts |
Tracks and serves session tasks. |
src/cli/commands/tools.ts |
Handles server-directed task creation. |
src/cli/commands/tasks.ts |
Supports modern task commands. |
src/cli/output.ts |
Formats both task shapes. |
src/cli/index.ts |
Updates command help and JSON shapes. |
src/cli/help-text.ts |
Adds the Tasks specification URL. |
test/unit/core/transports.test.ts |
Tests wrapped fetch behavior. |
test/unit/core/tasks-transport-shim.test.ts |
Tests shim and routing headers. |
test/unit/core/tasks-schema.test.ts |
Tests task validation. |
test/unit/core/protocol.test.ts |
Tests task diagnostics. |
test/unit/core/mcp-client.test.ts |
Tests modern task lifecycle behavior. |
test/unit/core/extensions.test.ts |
Tests extension declarations. |
test/unit/core/capabilities.test.ts |
Tests advertised task support. |
test/unit/cli/output.test.ts |
Tests task formatting. |
test/e2e/suites/sessions/tasks-unsupported.test.sh |
Tests unsupported-task failures. |
test/e2e/suites/sessions/tasks-extension.test.sh |
Covers extension-specific behavior. |
test/e2e/suites/sessions/async-tasks.test.sh |
Runs task flows across eras. |
test/e2e/suites/basic/help.test.sh |
Hardens help validation. |
test/e2e/suites/basic/extensions.test.sh |
Verifies task capability declarations. |
test/e2e/server/index-v2.ts |
Adds a modern task test server. |
test/e2e/server/fixtures.ts |
Updates shared task fixture documentation. |
test/conformance/README.md |
Documents current conformance coverage. |
skills/mcpc/SKILL.md |
Updates agent task guidance. |
README.md |
Documents modern tasks. |
docs/REFERENCE.md |
Regenerates CLI reference output. |
CLAUDE.md |
Records task architecture. |
CHANGELOG.md |
Adds release notes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Unwrap a detached call's outcome for the x402 helpers: the payment-required
check and the settlement receipt now see the tool result inside
`{ result }`, so a challenge answered synchronously by a 2026-07-28 server
is signed and retried instead of rendered
- `tasks-list` drops a tracked task only when the server answers `tasks/get`
with -32602 (unknown task); a timeout or any other failure fails the
listing instead of erasing the session's only record of the task
- Clamp the server's `pollIntervalMs` at five minutes as well as flooring it:
Node coerces a timer over 2^31-1 ms to 1 ms, which would turn an oversized
hint into a busy loop
- `isExtensionTask` decides on `ttlMs` alone; a modern task carrying a stray
`ttl` passthrough field was misclassified as legacy
- Help, README and the agent skill say that `--detach` prints the task ID in
human mode and the whole `Task` with `--json`
Refs #423
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXvpsSa4d6RkPP4FqhuDak
This branch has not been deployed
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.


mcpc now speaks the MCP tasks extension (
io.modelcontextprotocol/tasks) on 2026-07-28 servers, ahead of the official SDK — the way the skills extension landed in #401. Task creation is the server's call under this spec, so a plaintools-callthat comes back as a task is followed to its result,--detachmay return the tool result instead of a task, andtasks-listshows the tasks the session created (the extension has no listing). 2025-11-25 servers keep working unchanged.tasks/get/tasks/cancelandresultType: "task"answers past SDK 2.0.0's era gates and adds theMcp-Namerouting header the spec requirestasks/getpolling at the server'spollIntervalMs; failed, cancelled andinput_requiredoutcomes reported in their own words (mcpc never answersinputRequests)tasks-list;--detach --jsonprints the whole createdTasksessions/async-tasksnow runs in both eras and the newsessions/tasks-extensionsuite covers the extension-only behaviourRefs #401
🤖 Generated with Claude Code
https://claude.ai/code/session_01HXvpsSa4d6RkPP4FqhuDak