codex_sessions
List or import Codex CLI sessions for a selected project or workdir; filter archived sessions and import stopped threads with retry or operation keys.
Instructions
Choose workdir or project_id. list takes cursor/limit/archived; import takes thread_id, confirm_stopped=true, optional archived and an operation key. Native scope is verified before work.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "codex_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| action | No | list | |
| cursor | No | Native cursor | |
| workdir | No | Absolute project directory chosen by the main agent | |
| archived | No | ||
| thread_id | No | ||
| project_id | No | Selected project; use instead of workdir | |
| request_id | No | Key for identical retries | |
| operation_id | No | Alias of request_id | |
| confirm_stopped | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| result_version | Yes |