compress_history
Creates a concise extractive summary of previous session stages, limited to a target token count, enabling small-context models to access history without exceeding context limits.
Instructions
Deterministic extractive digest of prior stages' committed
thoughts, capped at target_tokens (a cheap len(text)//4 heuristic
-- no tokenizer dependency). The current stage is left out; its
detail is already visible via the live loop tools/
summarize_session. For small-context local models that can't
hold a whole session's history.
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": "compress_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| target_tokens | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||