Skip to content

Commit 47f1a49

Browse files
committed
feat(unstable): Rename unstable session/stop method to session/close
This better encapsulates the usage and differentiates it more from session/cancel
1 parent e749635 commit 47f1a49

10 files changed

Lines changed: 211 additions & 205 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ unstable = [
2222
"unstable_session_list",
2323
"unstable_session_model",
2424
"unstable_session_resume",
25-
"unstable_session_stop",
25+
"unstable_session_close",
2626
"unstable_session_usage",
2727
"unstable_message_id",
2828
"unstable_boolean_config",
@@ -34,7 +34,7 @@ unstable_session_info_update = []
3434
unstable_session_list = []
3535
unstable_session_model = []
3636
unstable_session_resume = []
37-
unstable_session_stop = []
37+
unstable_session_close = []
3838
unstable_session_usage = []
3939
unstable_message_id = []
4040
unstable_boolean_config = []

docs/docs.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"rfds/diff-delete",
124124
"rfds/boolean-config-option",
125125
"rfds/elicitation",
126-
"rfds/session-stop"
126+
"rfds/session-close"
127127
]
128128
},
129129
{
@@ -206,6 +206,11 @@
206206
"source": "/registry",
207207
"destination": "/get-started/registry",
208208
"permanent": false
209+
},
210+
{
211+
"source": "/rfds/session-stop",
212+
"destination": "/rfds/session-close",
213+
"permanent": true
209214
}
210215
]
211216
}

docs/protocol/draft/schema.mdx

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,71 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
196196
The ID of the session to cancel operations for.
197197
</ResponseField>
198198

199+
<a id="session-close"></a>
200+
### <span class="font-mono">session/close</span>
201+
202+
**UNSTABLE**
203+
204+
This capability is not part of the spec yet, and may be removed or changed at any point.
205+
206+
Closes an active session and frees up any resources associated with it.
207+
208+
This method is only available if the agent advertises the `session.close` capability.
209+
210+
The agent must cancel any ongoing work (as if `session/cancel` was called)
211+
and then free up any resources associated with the session.
212+
213+
#### <span class="font-mono">CloseSessionRequest</span>
214+
215+
**UNSTABLE**
216+
217+
This capability is not part of the spec yet, and may be removed or changed at any point.
218+
219+
Request parameters for closing an active session.
220+
221+
If supported, the agent **must** cancel any ongoing work related to the session
222+
(treat it as if `session/cancel` was called) and then free up any resources
223+
associated with the session.
224+
225+
Only available if the Agent supports the `session.close` capability.
226+
227+
**Type:** Object
228+
229+
**Properties:**
230+
231+
<ResponseField name="_meta" type={"object | null"} >
232+
The _meta property is reserved by ACP to allow clients and agents to attach additional
233+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
234+
these keys.
235+
236+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
237+
238+
</ResponseField>
239+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
240+
The ID of the session to close.
241+
</ResponseField>
242+
243+
#### <span class="font-mono">CloseSessionResponse</span>
244+
245+
**UNSTABLE**
246+
247+
This capability is not part of the spec yet, and may be removed or changed at any point.
248+
249+
Response from closing a session.
250+
251+
**Type:** Object
252+
253+
**Properties:**
254+
255+
<ResponseField name="_meta" type={"object | null"} >
256+
The _meta property is reserved by ACP to allow clients and agents to attach additional
257+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
258+
these keys.
259+
260+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
261+
262+
</ResponseField>
263+
199264
<a id="session-fork"></a>
200265
### <span class="font-mono">session/fork</span>
201266

@@ -897,71 +962,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
897962

898963
</ResponseField>
899964

900-
<a id="session-stop"></a>
901-
### <span class="font-mono">session/stop</span>
902-
903-
**UNSTABLE**
904-
905-
This capability is not part of the spec yet, and may be removed or changed at any point.
906-
907-
Stops an active session and frees up any resources associated with it.
908-
909-
This method is only available if the agent advertises the `session.stop` capability.
910-
911-
The agent must cancel any ongoing work (as if `session/cancel` was called)
912-
and then free up any resources associated with the session.
913-
914-
#### <span class="font-mono">StopSessionRequest</span>
915-
916-
**UNSTABLE**
917-
918-
This capability is not part of the spec yet, and may be removed or changed at any point.
919-
920-
Request parameters for stopping an active session.
921-
922-
If supported, the agent **must** cancel any ongoing work related to the session
923-
(treat it as if `session/cancel` was called) and then free up any resources
924-
associated with the session.
925-
926-
Only available if the Agent supports the `session.stop` capability.
927-
928-
**Type:** Object
929-
930-
**Properties:**
931-
932-
<ResponseField name="_meta" type={"object | null"} >
933-
The _meta property is reserved by ACP to allow clients and agents to attach additional
934-
metadata to their interactions. Implementations MUST NOT make assumptions about values at
935-
these keys.
936-
937-
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
938-
939-
</ResponseField>
940-
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
941-
The ID of the session to stop.
942-
</ResponseField>
943-
944-
#### <span class="font-mono">StopSessionResponse</span>
945-
946-
**UNSTABLE**
947-
948-
This capability is not part of the spec yet, and may be removed or changed at any point.
949-
950-
Response from stopping a session.
951-
952-
**Type:** Object
953-
954-
**Properties:**
955-
956-
<ResponseField name="_meta" type={"object | null"} >
957-
The _meta property is reserved by ACP to allow clients and agents to attach additional
958-
metadata to their interactions. Implementations MUST NOT make assumptions about values at
959-
these keys.
960-
961-
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
962-
963-
</ResponseField>
964-
965965
## Client
966966

967967
Defines the interface that ACP-compliant clients must implement.
@@ -3387,12 +3387,35 @@ This capability is not part of the spec yet, and may be removed or changed at an
33873387
Whether the agent supports `session/resume`.
33883388

33893389
</ResponseField>
3390-
<ResponseField name="stop" type={<><span><a href="#sessionstopcapabilities">SessionStopCapabilities</a></span><span> | null</span></>} >
3390+
<ResponseField name="stop" type={<><span><a href="#sessionclosecapabilities">SessionCloseCapabilities</a></span><span> | null</span></>} >
33913391
**UNSTABLE**
33923392

33933393
This capability is not part of the spec yet, and may be removed or changed at any point.
33943394

3395-
Whether the agent supports `session/stop`.
3395+
Whether the agent supports `session/close`.
3396+
3397+
</ResponseField>
3398+
3399+
## <span class="font-mono">SessionCloseCapabilities</span>
3400+
3401+
**UNSTABLE**
3402+
3403+
This capability is not part of the spec yet, and may be removed or changed at any point.
3404+
3405+
Capabilities for the `session/close` method.
3406+
3407+
By supplying `\{\}` it means that the agent supports closing of sessions.
3408+
3409+
**Type:** Object
3410+
3411+
**Properties:**
3412+
3413+
<ResponseField name="_meta" type={"object | null"} >
3414+
The _meta property is reserved by ACP to allow clients and agents to attach additional
3415+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
3416+
these keys.
3417+
3418+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
33963419

33973420
</ResponseField>
33983421

@@ -3818,29 +3841,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
38183841

38193842
</ResponseField>
38203843

3821-
## <span class="font-mono">SessionStopCapabilities</span>
3822-
3823-
**UNSTABLE**
3824-
3825-
This capability is not part of the spec yet, and may be removed or changed at any point.
3826-
3827-
Capabilities for the `session/stop` method.
3828-
3829-
By supplying `\{\}` it means that the agent supports stopping of sessions.
3830-
3831-
**Type:** Object
3832-
3833-
**Properties:**
3834-
3835-
<ResponseField name="_meta" type={"object | null"} >
3836-
The _meta property is reserved by ACP to allow clients and agents to attach additional
3837-
metadata to their interactions. Implementations MUST NOT make assumptions about values at
3838-
these keys.
3839-
3840-
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3841-
3842-
</ResponseField>
3843-
38443844
## <span class="font-mono">SessionUpdate</span>
38453845

38463846
Different types of updates that can be sent during session processing.
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Stopping active sessions"
2+
title: "Closing active sessions"
33
---
44

55
Author(s): [@SteffenDE](https://github.com/SteffenDE)
@@ -8,7 +8,7 @@ Author(s): [@SteffenDE](https://github.com/SteffenDE)
88

99
> What are you proposing to change?
1010
11-
We propose adding the ability to stop active sessions. This allows the agent to free up any memory
11+
We propose adding the ability to close active sessions. This allows the agent to free up any memory
1212
and threads/subprocesses associated with that session.
1313

1414
## Status quo
@@ -29,31 +29,31 @@ lead to a bad user experience.
2929

3030
> What are you proposing to improve the situation?
3131
32-
Add a new `session/stop` method. If supported, the agent **must** cancel any ongoing work
32+
Add a new `session/close` method. If supported, the agent **must** cancel any ongoing work
3333
related to the session (treat it as if `session/cancel` was called) and then free up any resources
3434
associated with the session.
3535

3636
## Shiny future
3737

3838
> How will things will play out once this feature exists?
3939
40-
Clients can track what sessions are actively used by a user and automatically stop old sessions.
40+
Clients can track what sessions are actively used by a user and automatically close old sessions.
4141

4242
## Implementation details and plan
4343

4444
> Tell me more about your implementation. What is your detailed implementation plan?
4545
46-
We propose to add a new `"session/stop"` method. Agents must declare this option is
47-
available by returning `session: { stop : {} }` in their capabilities. The object is reserved
46+
We propose to add a new `"session/close"` method. Agents must declare this option is
47+
available by returning `session: { close : {} }` in their capabilities. The object is reserved
4848
to declare future capabilities.
4949

50-
Then the client would be able to stop a specific session with:
50+
Then the client would be able to close a specific session with:
5151

5252
```json
5353
{
5454
"jsonrpc": "2.0",
5555
"id": 1,
56-
"method": "session/stop",
56+
"method": "session/close",
5757
"params": {
5858
"sessionId": "sess_789xyz"
5959
}
@@ -76,4 +76,5 @@ seems like a good idea.
7676

7777
## Revision history
7878

79+
2026-03-09: Rename from session/stop to session/close
7980
2026-02-24: Initial draft

docs/updates.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ rss: true
55
---
66

77
<Update label="February 24, 2026" tags={["RFD"]}>
8-
## session/stop RFD moves to Draft stage
8+
## session/close RFD moves to Draft stage
99

10-
The RFD for allowing agents to close or stop a given session has been moved to Draft stage. Please review the [RFD](./rfds/session-stop) for more information on the current proposal and provide feedback as work on the implementation begins.
10+
The RFD for allowing agents to close a given session has been moved to Draft stage. Please review the [RFD](./rfds/session-close) for more information on the current proposal and provide feedback as work on the implementation begins.
1111

1212
</Update>
1313

schema/meta.unstable.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"authenticate": "authenticate",
44
"initialize": "initialize",
55
"session_cancel": "session/cancel",
6+
"session_close": "session/close",
67
"session_fork": "session/fork",
78
"session_list": "session/list",
89
"session_load": "session/load",
@@ -11,8 +12,7 @@
1112
"session_resume": "session/resume",
1213
"session_set_config_option": "session/set_config_option",
1314
"session_set_mode": "session/set_mode",
14-
"session_set_model": "session/set_model",
15-
"session_stop": "session/stop"
15+
"session_set_model": "session/set_model"
1616
},
1717
"clientMethods": {
1818
"fs_read_text_file": "fs/read_text_file",

0 commit comments

Comments
 (0)