openclaw_sessions_compact
Reduce session history size by triggering a compaction snapshot while keeping the session running.
Instructions
Trigger a compaction of a session's history (creates a new compaction snapshot, keeps the session live). Wraps sessions.compact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session id. Most session.* methods accept the `sessionId` (UUID); a few accept the composite `key` (e.g. 'agent:main:cron:<id>'). When unsure, try the UUID first; if rejected with NOT_FOUND, retry with the key from openclaw_sessions_list. | |
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. |