SEP-2669: Task Interaction Methods (steer, pause, resume)#2669
Open
prezaei wants to merge 13 commits into
Open
SEP-2669: Task Interaction Methods (steer, pause, resume)#2669prezaei wants to merge 13 commits into
prezaei wants to merge 13 commits into
Conversation
Extends the MCP Tasks extension (SEP-2663) with three methods for interacting with running tasks: - tasks/steer: unsolicited mid-run feedback (ack-only) - tasks/pause: cooperative halt with paused status - tasks/resume: continue from paused Discussed with @LucaButBoring in modelcontextprotocol#2663. Production implementation deployed with reference data (steer reduced cancellation ~40%). File uses 0000 placeholder — will rename to PR# after creation.
Add normative requirement: when a task transitions from input_required to paused and back, pending inputRequests remain valid with the same keys and semantics. Consistent with key-lifetime uniqueness rule from SEP-2663 and the non-destructive nature of pause. Resolve open question modelcontextprotocol#2 (was: are inputRequests valid after resume?).
- Add requestState?: string to tasks/steer, tasks/pause, tasks/resume params — consistent with base spec methods for stateless routing - Remove steer queue depth limit (not needed at protocol level) - Remove Open Questions section (all resolved: inputRequests survive pause/resume is now normative, requestState added)
- Add explicit SEP-2663 dependency (Requires field, in-review note) - Soften "every deployed" to "deployed systems each implement their own" - Acknowledge tasks/steer terminal rejection diverges from silent-ack - Add paused → failed transition (server error while paused) - Remove Reference Implementation section - Add Open Questions (paused visibility, steer/input interaction) - Move sponsor suggestion from preamble to PR description - Sync .mdx with .md (add TaskStatus union, DetailedTask extension)
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.
This SEP extends the MCP Tasks extension (SEP-2663) with three methods for interacting with running tasks:
tasks/steer(unsolicited mid-run feedback),tasks/pause(cooperative halt), andtasks/resume(continue from paused). Together, these enable human-in-the-loop and agent-in-the-loop patterns for long-running task execution — the ability to redirect, pause, and resume work without cancelling and losing accumulated state.The methods follow the design patterns established by SEP-2663: they use the reserved
tasks/method prefix, carrytaskIdas the routing key, and respect the consistency model (ack-only writes, cooperative operations, capability negotiation via sub-capabilities withinio.modelcontextprotocol/tasks).This proposal requires SEP-2663 (Tasks Extension, currently in-review) and cannot land until SEP-2663 is accepted, as it depends on the types, methods, and consistency model SEP-2663 introduces.
Motivation and Context
SEP-2663 provides the foundation for durable, asynchronous task execution: create a task, poll for status, deliver input when requested, cancel if needed. This covers the lifecycle, but treats the running task as a closed box — the only client interactions are responding to server-initiated input requests (
tasks/update) and terminating (tasks/cancel). For subagent-as-a-service — where a parent agent or human user delegates work to a specialist agent consumed over MCP — two interaction patterns are missing:The user can't redirect. Once a task starts, there is no way for a user or parent agent to provide unsolicited feedback. Deployed human-in-the-loop agent systems (GitHub Copilot, Cursor, Windsurf, Devin) each implement their own form of mid-run feedback, but with no standard mechanism. The absence of a protocol-level primitive forces each to invent its own, fragmenting the ecosystem — exactly the outcome MCP's "convergence over choice" principle aims to prevent.
tasks/updateis not suitable because it deliversinputResponseskeyed to specificinputRequeststhe server issued; steering is unsolicited direction the server didn't ask for.The user can't pause. Long-running tasks (browser automation, multi-step research, code generation) often reach a point where the user wants to pause — review partial output, think, then continue. Or the server itself needs to pause (browser completed the ask, holding the VM for follow-up). Today the only options are "let it run" or "cancel and lose all progress."
tasks/cancelis destructive — it discards accumulated context and partial results.This proposal solves these by adding:
tasks/steer— ack-only unsolicited feedback, queued for delivery at the next server-determined safe point. Follows the same ack-only, eventually-consistent pattern astasks/updateandtasks/cancel. Diverges from those methods for terminal tasks (rejects with-32602rather than silent ack, since delivering queued messages to a completed task would be misleading).tasks/pauseandtasks/resume— cooperative halt/continue adding apausedstatus to the task lifecycle. ReturnsDetailedTask(unlike ack-only writes) so the client has immediate feedback on whether the cooperative operation succeeded. Server MAY also initiate pause without a client request (resource management, billing checkpoints).Prior Discussion
@LucaButBoring welcomed a formal SEP in #2663: "I would welcome a formal SEP for that... I do like the idea of leveraging the ack-only pattern we're introducing to do unsolicited messaging."
How Has This Been Tested?
Reference implementation deployed across multiple agent services. Key patterns: per-task async queues for steer delivery at safe points, async events for cooperative pause at yield points, custom MCP request handlers.
Breaking Changes
None. Fully backward compatible with SEP-2663. No changes to existing methods, status values, or transitions. The
pausedstatus is additive. Capability negotiation via sub-capabilities ensures no silent failures.Types of changes
Checklist
Additional context
Seeking sponsor: @CaitieM20 or @LucaButBoring from the Agents WG would be natural fits given the prior discussion and alignment with the tasks roadmap.
AI Use Disclosure: AI tools were used for cross-referencing SEPs (2663, 2322, 2567, 2575) and adversarial review of the proposal against upstream specs. All design decisions were human-directed.