LM Studio: compact a session
session_compactSummarize a session to free its context, then continue with a fresh context seeded by that summary; use when context-full warnings appear.
Instructions
Free the context of a session: the model summarizes the conversation, and the next message starts a fresh context that begins with that summary. Use it when session_send or task_status warns that the context is getting full.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>"
},
"name": "session_compact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session id from session_start or session_get. | |
| instructions | No | What the summary must keep, in addition to the usual facts, decisions and open work. |