Skip to content

Commit 1a3bea6

Browse files
committed
docs: clarify stdio process lifetime in lifecycle spec
Add prescriptive guidance that the stdio process should track the host application lifetime and serve multiple tasks, threads, or conversations, rather than being scoped to any single one.
1 parent d494db5 commit 1a3bea6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/specification/draft/basic/lifecycle.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ Specifically:
2020
establish context (e.g., capabilities, protocol version, client identity).
2121
Every request supplies this metadata in its
2222
[`_meta`](/specification/draft/basic/index#meta) field.
23-
- Servers **MUST NOT** require that a client reuse the same connection to
24-
perform related operations.
23+
- Servers **SHOULD** be prepared to handle requests associated with multiple
24+
tasks, threads, or conversations. Servers **SHOULD NOT** require that a client
25+
reuse the same connection or process to perform related operations. Clients
26+
**SHOULD NOT** use an individual task, thread, or conversation as the default
27+
lifetime boundary for the stdio process.
2528
- State that needs to span multiple requests (e.g., long-running tasks,
2629
application-level handles) **MUST** be referenced by an explicit identifier
2730
the client passes on each request.
31+
- The stdio process **SHOULD** have approximately the same lifetime as the host
32+
application instance that launched it. Clients **SHOULD** attempt to restart
33+
the stdio process if the server terminates unexpectedly.
2834

2935
Long-lived requests like
3036
[`subscriptions/listen`](/specification/draft/basic/utilities/subscriptions)

0 commit comments

Comments
 (0)