SEP-2679: Task streaming partial results#2679
Open
morozow wants to merge 5 commits into
Open
Conversation
- Add new SEP document defining task streaming extension for long-running operations - Extend Tasks primitive (SEP-1686) with backward-compatible partial result mechanism - Introduce `notifications/tasks/partial` notification type for incremental content delivery - Enable real-time streaming of LLM-generated text and progressive analysis results - Include detailed specification, behavioral requirements, and implementation guidance - Address streaming gaps in agent-to-agent communication, IDE UX, and polling overhead - Provide consistent developer experience across synchronous and task-augmented execution models
- Mark SEP as officially assigned and ready for review - Update PR reference from "Pending" to linked PR modelcontextprotocol#2679 - Rename SEP file from 0000-task-streaming-partial-results.md to 2679-task-streaming-partial-results.md
- Add new SEP-2679 document for task streaming with partial results - Update docs.json to include SEP-2679 in Draft section - Update SEP index to reference new task streaming specification - Enables incremental content delivery for long-running MCP operations
- Improves readability and follows markdown best practices for list separation - Add blank line before bullet list in End-to-End Example section for improved markdown formatting
- Remove email address from author field, keeping only name and GitHub link - Normalize table column widths in mdx file for consistency - Simplify author attribution format across both documentation files - Improve readability by removing unnecessary email formatting
10 tasks
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.
SEP-2679 for Task Streaming — Partial Results for Long-Running Operations.
This SEP extends the Tasks primitive (SEP-1686) with a new
notifications/tasks/partialJSON-RPC notification type that enables task receivers to push incremental content chunks to requestors while a task is in progress. The proposal addresses the streaming gap identified as future work in SEP-1686, enabling real-time delivery of LLM-generated text, progressive analysis results, and other incremental outputs through the existing task lifecycle.Motivation and Context
SEP-1686 introduced Tasks as a "call-now, fetch-later" mechanism but provides no standard way to deliver incremental content during execution. This creates concrete problems across MCP deployments:
tasks/getpolling adds average 2.5s tail latency per task and generates N requests per task for hosted servers handling thousands of concurrent clientsThe proposal builds directly on the "Intermediate Results" and "Push Notifications" items explicitly identified as future work in SEP-1686.
How Has This Been Tested?
A working reference implementation is provided in a fork of the TypeScript SDK:
sep/task-streaming-partial-results-notifications)The prototype includes:
TaskPartialNotificationParamsSchemaandTaskPartialNotificationSchemaZod schemas with full type conformancesendTaskPartial()with Zod validation andcreatePartialEmitter()with auto-incrementing seq onExperimentalMcpServerTaskssubscribeTaskPartials()with seq-based ordering, duplicate detection, and gap warning onExperimentalClientTaskstasks.streaming.partialon bothServerCapabilitiesandClientCapabilitiesTest results (zero regressions against existing tests):
packages/core: 22 files, 587 tests ✓packages/server: 7 files, 83 tests ✓packages/client: 11 files, 378 tests ✓test/integration: 17 files, 433 tests ✓The prototype demonstrates that the design integrates cleanly with the existing Tasks infrastructure without requiring transport-level changes.
Breaking Changes
None. This SEP introduces only additive changes:
notifications/tasks/partial)tasks.streaming.partial)execution.streamPartial)Old clients ignore unknown notifications per JSON-RPC 2.0. Old servers simply don't send partials. The canonical result is always available via
tasks/resultregardless of streaming support.Types of changes
Checklist
Additional context
SEP structure follows the SEP format guidelines: Preamble, Abstract, Motivation (5 deployment categories), Specification (notification format, capability negotiation, tool-level declaration, lifecycle interaction, transport considerations), Rationale (alternative designs considered), Backward Compatibility, Reference Implementation, Security Implications (6 areas), and Open Questions.
Seeking sponsor from Core Maintainers. The proposal aligns with the direction outlined in SEP-1686 and addresses a gap that affects agent-to-agent communication, IDE integrations, and hosted MCP deployments.
AI Disclosure: This SEP was developed with AI assistance (Claude via Kiro IDE). AI was used for SDK codebase analysis, requirements validation, reference implementation, and document consistency checking. All protocol design decisions, behavioral semantics, and the SEP narrative were authored and reviewed by the human author.