session/compact
Compacts the session’s conversation context; runs asynchronously, so the ack is admission only.
Parameters
Section titled “Parameters”Type: SessionCompactParams
session/compact params: manually compact the session’s
conversation context — the /compact gesture. Compaction runs
asynchronously; the ack is admission only.
| Field | Type | Stability | Presence | Description |
|---|---|---|---|---|
commandId |
string |
required | The idempotency handle (UUIDv7). | |
sessionId |
string |
required | The target session. | |
turnId |
string |
optional | The run whose context to compact. Omit and the server resolves the session’s current/latest run; a session with no resolvable run rejects with commandRejected reason missing_run. |
Source
schema/msp/experimental/msp.schema.json#/methods/session~2Fcompact
{ "description": "Compacts the session's conversation context; runs asynchronously, so the ack is admission only.", "params": { "$ref": "#/$defs/SessionCompactParams" }, "result": { "$ref": "#/$defs/SessionCompactResult" }}