codex_start_thread_compaction
Initiates context compaction for a specified thread and returns an action ID. Use after active work is completed, then poll for status.
Instructions
Start context compaction for a known thread and return actionId. Use this after active work is terminal. Next poll codex_get_thread_compaction_status.
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": {
"thread_id": "<thread_id>"
},
"name": "codex_start_thread_compaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | ||
| project_id | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| agentGuidance | No | ||
| agentGuidanceText | No | ||
| recoveryAttemptState | No |