Skip to content

sep: bounded task-output views on Events - #38

Open
girishkvs wants to merge 1 commit into
modelcontextprotocol:mainfrom
girishkvs:task-output-views
Open

girishkvs wants to merge 1 commit into
modelcontextprotocol:mainfrom
girishkvs:task-output-views

Conversation

@girishkvs

Copy link
Copy Markdown

Draft SEP that moves modelcontextprotocol/agents-ig#30 (bounded task-output views) to ext-tasks and rebuilds it on Events (SEP-3415), so Tasks does not get a second output channel.

  • A task output event type, mcp.task.output.updated, bound to a task through eventSource from Draft: Task Event Sources ext-events#2.
  • Its payload is the whole current view: revision, availability (available, empty or unavailable), maxBytes and content blocks. Over the bound means unavailable, never cut.
  • Clients replace by revision, an older revision never replaces a newer one, and the same revision with different content is a conflict. There is no view after terminal status, and the result comes from tasks/get.
  • Three proposed changes to Events: late join, coalescing without truncated, and a normal end. Each comes with an alternative that needs no Events change.

Related: modelcontextprotocol/modelcontextprotocol#3237, modelcontextprotocol/agents-ig#26. No sponsor yet.

Comment thread seps/bounded-task-output-views.md Outdated

What a generic client cannot do is interpret that output without learning each server's own rules:

- A value of `["A"]` followed by `["A", "B"]` can mean replace or append. Two clients can accept the same JSON and show different output.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe events always append? @pja-ant can you confirm?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LucaButBoring for the review. I agree the event stream always appends. This line is about what a client shows from each event's data: after ["A"] and then ["A", "B"], one client shows A, B because it replaces the view, and another shows A, A, B because it adds to it. Events leaves data to each event type's payloadSchema, so both readings are valid today. This SEP picks replace, and I reworded this line to say that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the event stream always appends, is it not incorrect to show A, B instead of A, A, B?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rather, it is not incorrect for the client to emit A, B after previously emitting A, but the host should interpret that as an append and maintain its own A, A, B if it wants to present a useful view of the data to the model (or else the model might get confused, which would be a poor user experience).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LucaButBoring Each event here carries the whole current view, so if the host appends them, the model sees A, A, B when the task only produced A, B. That's why this SEP picks replace for the client's view. I agree the host can still keep its own history for the model, like adding each new view as a message with its revision. I'm happy to add a line on this in the Replacement section if that helps.

Comment thread seps/bounded-task-output-views.md Resolved
Comment thread seps/bounded-task-output-views.md Outdated
- **Author(s)**: Girish Konda (@girishkvs)
- **Sponsor**: None (seeking sponsor)
- **Extension Identifier**: `io.modelcontextprotocol/tasks`
- **Amends**: the Tasks extension ([SEP-2663](https://modelcontextprotocol.io/seps/2663-tasks-extension)), using Events ([SEP-3415](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3415), `io.modelcontextprotocol/events`) and Task Event Sources ([ext-events#2](https://github.com/modelcontextprotocol/ext-events/pull/2)). Proposes three changes to Events.

@LucaButBoring LucaButBoring Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I've seen little intent to accept modelcontextprotocol/ext-events#2 yet

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this SEP should not depend on it, so I made ext-events#2 optional. A client that has the task ID can subscribe to mcp.task.output.updated with { "taskId": ... } directly, without eventSource. The SEP also takes three rules from that PR, and I stated them in the SEP itself: the same authorization as tasks/get, the event stream ending when the task ends, and task status staying with Tasks. Let me know if that works.

Draft SEP that moves modelcontextprotocol/agents-ig#30 to ext-tasks,
rebuilt on Events (SEP-3415), with Task Event Sources (ext-events#2)
as an optional binding.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants