|
| 1 | +--- |
| 2 | +title: "Resuming of existing sessions" |
| 3 | +--- |
| 4 | + |
| 5 | +- Author(s): [@josevalim](https://github.com/josevalim) |
| 6 | +- Champion: [@benbrandt](https://github.com/benbrandt) |
| 7 | + |
| 8 | +## Elevator pitch |
| 9 | + |
| 10 | +> What are you proposing to change? |
| 11 | +
|
| 12 | +We propose adding the ability to resume existing sessions. This is similar to "session/load", |
| 13 | +except it does not return previous messages. |
| 14 | + |
| 15 | +## Status quo |
| 16 | + |
| 17 | +> How do things work today and what problems does this cause? Why would we change things? |
| 18 | +
|
| 19 | +While the spec provides a "session/load" command, not all coding agents implement it. |
| 20 | +This means that, once you close your editor, browser, etc, you can't resume the conversation. |
| 21 | + |
| 22 | +This is particularly a problem for agents that do not directly implement ACP and the |
| 23 | +functionality is implemented via a wrapper. In such cases, they may provide the ability |
| 24 | +to resume (without history), which we would like to hook into. Not only that, resuming |
| 25 | +could be used as a mechanism for proxies and adapter libraries to emulate "session/load". |
| 26 | + |
| 27 | +## What we propose to do about it |
| 28 | + |
| 29 | +> What are you proposing to improve the situation? |
| 30 | +
|
| 31 | +Add a "session/resume" command and a capability `{ session: { resume: {} }`. |
| 32 | + |
| 33 | +## Shiny future |
| 34 | + |
| 35 | +> How will things will play out once this feature exists? |
| 36 | +
|
| 37 | +We will be able to resume existing conversations, providing a better user experience. |
| 38 | + |
| 39 | +Not only that, if an agent does not implement "session/load" but it does implement |
| 40 | +"session/resume", it is now possible to implement a proxy/adapter that intercepts |
| 41 | +the agents messages and writes them to disk. Now when the client issues a |
| 42 | +"session/load", the proxy/adapter converts it to a "session/resume", and then returns |
| 43 | +the stored messages. |
| 44 | + |
| 45 | +## Implementation details and plan |
| 46 | + |
| 47 | +> Tell me more about your implementation. What is your detailed implementation plan? |
| 48 | +
|
| 49 | +## Frequently asked questions |
| 50 | + |
| 51 | +> What questions have arisen over the course of authoring this document or during subsequent discussions? |
| 52 | +
|
| 53 | +### Should we introduce a new operation (session/resume) or add an option to (session/load)? |
| 54 | + |
| 55 | +A separate method provides a few benefits: |
| 56 | + |
| 57 | +- for clients that for whatever reason don't want the history, they can just resume |
| 58 | + |
| 59 | +- for agents that can only supply resume, a proxy on top could provide load on top of it, |
| 60 | + but the agent is still clear on what it supports |
| 61 | + |
| 62 | +- for agents who support both, it should be trivial to use the same resume functionality, |
| 63 | + they just either replay events or do not |
| 64 | + |
| 65 | +### What alternative approaches did you consider, and why did you settle on this one? |
| 66 | + |
| 67 | +The biggest question is if it makes sense to support both "session/load" and |
| 68 | +"session/resume". |
| 69 | + |
| 70 | +When we start a new session over ACP, we introduce custom MCP tools and configuration. |
| 71 | +This means that, while we could use "session/load" to load our own chats, loading |
| 72 | +third-party chats would likely lead to a flawed user experience, as our tools would |
| 73 | +not be available. And depending on the ACP implementation, not even the capabilities |
| 74 | +would be respected (as loading a third-party session would not include our capabilities |
| 75 | +in its history, misleading the agent). |
| 76 | + |
| 77 | +Therefore, if we assume "session/load" is for loading conversations started by the client |
| 78 | +itself, "session/resume" is effectively a subset of "session/load", decoupled from storage |
| 79 | +mechanics. If an agent implements "session/load", then it can be used directly, but if it |
| 80 | +doesn't, a proxy or adapter can provide a reasonable fallback on top of "session/resume". |
| 81 | +This argues "session/resume" is the basic primitive which "session/load" builds on top of. |
| 82 | + |
| 83 | +## Revision history |
| 84 | + |
| 85 | +- 2025-11-24: Update FAQ to mention session/resume vs session/load |
0 commit comments