List prior Codex sessions
codex_sessionsList local Codex sessions from ~/.codex/sessions, returning session ID, cwd, and last activity newest first. Filter by cwd to find sessions for resuming with codex_continue.
Instructions
Discover Codex sessions stored locally under ~/.codex/sessions/. Returns sessionId, cwd, and last activity for each, newest first. sessionId can be passed to codex_continue to resume. Filter by cwd to find sessions from a specific workspace.
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 |
|---|---|---|---|
| cwd | No | Filter to sessions whose recorded cwd matches this path exactly. | |
| limit | No | Cap on returned sessions (default 50, hard cap 500). |