Skip to content

Commit 145bebd

Browse files
authored
docs(rfd): Move session/resume to Preview (#969)
* docs(rfd): Move session/resume to Preview * Update RFD
1 parent 9e5f8d7 commit 145bebd

File tree

7 files changed

+113
-14
lines changed

7 files changed

+113
-14
lines changed

docs/docs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
"pages": [
115115
"rfds/session-fork",
116116
"rfds/request-cancellation",
117-
"rfds/session-resume",
118117
"rfds/meta-propagation",
119118
"rfds/agent-telemetry-export",
120119
"rfds/proxy-chains",
@@ -136,7 +135,7 @@
136135
},
137136
{
138137
"group": "Preview",
139-
"pages": []
138+
"pages": ["rfds/session-resume"]
140139
},
141140
{
142141
"group": "Completed",

docs/protocol/draft/schema.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ This capability is not part of the spec yet, and may be removed or changed at an
13791379

13801380
Resumes an existing session without returning previous messages.
13811381

1382-
This method is only available if the agent advertises the `session.resume` capability.
1382+
This method is only available if the agent advertises the `sessionCapabilities.resume` capability.
13831383

13841384
The agent should resume the session context, allowing the conversation to continue
13851385
without replaying the message history (unlike `session/load`).
@@ -1395,7 +1395,7 @@ Request parameters for resuming an existing session.
13951395
Resumes an existing session without returning previous messages (unlike `session/load`).
13961396
This is useful for agents that can resume sessions but don't implement full session loading.
13971397

1398-
Only available if the Agent supports the `session.resume` capability.
1398+
Only available if the Agent supports the `sessionCapabilities.resume` capability.
13991399

14001400
**Type:** Object
14011401

docs/protocol/draft/session-setup.mdx

Lines changed: 96 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ sequenceDiagram
3030
Agent->>Client: session/update
3131
Note over Agent,Client: All content streamed
3232
Agent-->>Client: session/load response
33+
else
34+
Client->>Agent: session/resume (sessionId)
35+
Note over Agent: Restore session context
36+
Note over Agent: Connect to MCP servers
37+
Agent-->>Client: session/resume response
3338
end
3439
3540
Note over Client,Agent: Ready for prompts
@@ -77,7 +82,7 @@ The Agent **MUST** respond with a unique [Session ID](#session-id) that identifi
7782

7883
## Loading Sessions
7984

80-
Agents that support the `loadSession` capability allow Clients to resume previous conversations. This feature enables persistence across restarts and sharing sessions between different Client instances.
85+
Agents that support the `loadSession` capability allow Clients to resume previous conversations with history replay. This feature enables persistence across restarts and sharing sessions between different Client instances.
8186

8287
### Checking Support
8388

@@ -166,17 +171,102 @@ Followed by the agent's response:
166171
}
167172
```
168173

169-
When **all** the conversation entries have been streamed to the Client, the Agent **MUST** respond to the original `session/load` request.
174+
When **all** the conversation entries have been streamed to the Client, the
175+
Agent **MUST** respond to the original `session/load` request.
170176

171177
```json
172178
{
173179
"jsonrpc": "2.0",
174180
"id": 1,
175-
"result": null
181+
"result": {}
182+
}
183+
```
184+
185+
The response **MAY** also include initial mode, model, or session configuration
186+
state when those features are supported by the Agent.
187+
188+
The Client can then continue sending prompts as if the session was never
189+
interrupted.
190+
191+
## Resuming Sessions
192+
193+
<Note>
194+
This section describes the preview `session/resume` method. Clients MUST gate
195+
usage on the `sessionCapabilities.resume` capability being present during
196+
initialization.
197+
</Note>
198+
199+
Agents that advertise `sessionCapabilities.resume` allow Clients to reconnect to
200+
an existing session without replaying the conversation history.
201+
202+
### Checking Support
203+
204+
Before attempting to resume a session, Clients **MUST** verify that the Agent
205+
supports this capability by checking for the `sessionCapabilities.resume` field
206+
in the `initialize` response:
207+
208+
```json highlight={8-10}
209+
{
210+
"jsonrpc": "2.0",
211+
"id": 0,
212+
"result": {
213+
"protocolVersion": 1,
214+
"agentCapabilities": {
215+
"sessionCapabilities": {
216+
"resume": {}
217+
}
218+
}
219+
}
220+
}
221+
```
222+
223+
If `sessionCapabilities.resume` is not present, the Agent does not support
224+
resuming sessions and Clients **MUST NOT** attempt to call `session/resume`.
225+
226+
### Resuming a Session
227+
228+
To resume an existing session without replaying prior messages, Clients
229+
**MUST** call the `session/resume` method with:
230+
231+
- The [Session ID](#session-id) to resume
232+
- [MCP servers](#mcp-servers) to connect to
233+
- The [working directory](#working-directory)
234+
235+
```json
236+
{
237+
"jsonrpc": "2.0",
238+
"id": 2,
239+
"method": "session/resume",
240+
"params": {
241+
"sessionId": "sess_789xyz",
242+
"cwd": "/home/user/project",
243+
"mcpServers": [
244+
{
245+
"name": "filesystem",
246+
"command": "/path/to/mcp-server",
247+
"args": ["--mode", "filesystem"],
248+
"env": []
249+
}
250+
]
251+
}
252+
}
253+
```
254+
255+
Unlike `session/load`, the Agent **MUST NOT** replay the conversation history
256+
via `session/update` notifications before responding. Instead, it restores the
257+
session context, reconnects to the requested MCP servers, and returns once the
258+
session is ready to continue.
259+
260+
```json
261+
{
262+
"jsonrpc": "2.0",
263+
"id": 2,
264+
"result": {}
176265
}
177266
```
178267

179-
The Client can then continue sending prompts as if the session was never interrupted.
268+
The response **MAY** also include initial mode, model, or session configuration
269+
state when those features are supported by the Agent.
180270

181271
## Additional Workspace Roots
182272

@@ -214,7 +304,7 @@ When present, `additionalDirectories` has the following behavior:
214304
- `cwd` remains the primary working directory and the base for relative paths
215305
- each `additionalDirectories` entry **MUST** be an absolute path
216306
- omitting the field or providing an empty array activates no additional roots for the resulting session
217-
- on `session/load`, Clients must send the full intended additional-root list again because omitting the field or providing an empty array does not restore stored roots implicitly
307+
- on `session/load` and `session/resume`, Clients must send the full intended additional-root list again because omitting the field or providing an empty array does not restore stored roots implicitly
218308

219309
## Session ID
220310

@@ -225,6 +315,7 @@ Clients use this ID to:
225315
- Send prompt requests via `session/prompt`
226316
- Cancel ongoing operations via `session/cancel`
227317
- Load previous sessions via `session/load` (if the Agent supports the `loadSession` capability)
318+
- Resume previous sessions via `session/resume` (if the Agent supports the preview `sessionCapabilities.resume` capability)
228319

229320
## Working Directory
230321

docs/rfds/session-resume.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ could be used as a mechanism for proxies and adapter libraries to emulate "sessi
2828

2929
> What are you proposing to improve the situation?
3030
31-
Add a "session/resume" command and a capability `{ session: { resume: {} }`.
31+
Add a "session/resume" command and a capability
32+
`{ sessionCapabilities: { resume: {} } }`.
3233

3334
## Shiny future
3435

@@ -82,4 +83,5 @@ This argues "session/resume" is the basic primitive which "session/load" builds
8283

8384
## Revision history
8485

86+
- 2026-04-14: Update capability shape to `sessionCapabilities.resume`
8587
- 2025-11-24: Update FAQ to mention session/resume vs session/load

docs/rfds/updates.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ rss: true
66

77
This page tracks lifecycle changes for ACP Requests for Dialog. For broader ACP announcements, see [Updates](/updates).
88

9+
<Update label="April 14, 2026" tags={["Preview"]}>
10+
## session/resume RFD moves to Preview stage
11+
12+
The RFD for adding a `session/resume` method to the protocol has been moved to Preview stage. Please review the [RFD](/rfds/session-resume) for more information on the current proposal and provide feedback before the feature is stabilized.
13+
14+
</Update>
15+
916
<Update label="March 27, 2026" tags={["Draft"]}>
1017
## Custom LLM Endpoint RFD moves to Draft stage
1118

schema/schema.unstable.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@
12381238
"$ref": "#/$defs/ResumeSessionRequest"
12391239
}
12401240
],
1241-
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `session.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`).",
1241+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `sessionCapabilities.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`).",
12421242
"title": "ResumeSessionRequest"
12431243
},
12441244
{
@@ -5219,7 +5219,7 @@
52195219
"type": "object"
52205220
},
52215221
"ResumeSessionRequest": {
5222-
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for resuming an existing session.\n\nResumes an existing session without returning previous messages (unlike `session/load`).\nThis is useful for agents that can resume sessions but don't implement full session loading.\n\nOnly available if the Agent supports the `session.resume` capability.",
5222+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for resuming an existing session.\n\nResumes an existing session without returning previous messages (unlike `session/load`).\nThis is useful for agents that can resume sessions but don't implement full session loading.\n\nOnly available if the Agent supports the `sessionCapabilities.resume` capability.",
52235223
"properties": {
52245224
"_meta": {
52255225
"additionalProperties": true,

src/agent.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ impl ForkSessionResponse {
14301430
/// Resumes an existing session without returning previous messages (unlike `session/load`).
14311431
/// This is useful for agents that can resume sessions but don't implement full session loading.
14321432
///
1433-
/// Only available if the Agent supports the `session.resume` capability.
1433+
/// Only available if the Agent supports the `sessionCapabilities.resume` capability.
14341434
#[cfg(feature = "unstable_session_resume")]
14351435
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
14361436
#[schemars(extend("x-side" = "agent", "x-method" = SESSION_RESUME_METHOD_NAME))]
@@ -4702,7 +4702,7 @@ pub enum ClientRequest {
47024702
///
47034703
/// Resumes an existing session without returning previous messages.
47044704
///
4705-
/// This method is only available if the agent advertises the `session.resume` capability.
4705+
/// This method is only available if the agent advertises the `sessionCapabilities.resume` capability.
47064706
///
47074707
/// The agent should resume the session context, allowing the conversation to continue
47084708
/// without replaying the message history (unlike `session/load`).

0 commit comments

Comments
 (0)