通过读取 `~/.codex/session_index.jsonl`、`~/.codex/sessions/` 和 `~/.codex/archived_sessions/`,列出并检查本地 Codex 会话历史,默认...
Use this skill to enumerate local Codex sessions and map each session to its id, title, project, and workspace path.
Prefer the bundled script so the output stays consistent and works even when session_index.jsonl is incomplete.
session_meta.payload.id as the canonical session id.session_meta.payload.cwd as the workspace anchor.cwd.session_index.jsonl only as enrichment for thread_name and updated_at.thread_name is available, fall back to the first user message summary.List recent sessions:
bash
python3 scripts/list_codex_sessions.py
List active and archived sessions together:
bash
python3 scripts/list_codex_sessions.py --source all
List more rows:
bash
python3 scripts/list_codex_sessions.py --limit 50
Filter by project:
bash
python3 scripts/list_codex_sessions.py --project PlayGround
Filter by a local time window on today's date:
bash
python3 scripts/list_codex_sessions.py --from 11:00 --to 12:00
Filter by a local time window on a specific date:
bash
python3 scripts/list_codex_sessions.py --date 2026-03-19 --from 11:00 --to 12:00
Inspect one session id:
bash
python3 scripts/list_codex_sessions.py --session-id 019ce206-aa11-7c81-a65a-fece3708ecf4 --details
Only show archived sessions:
bash
python3 scripts/list_codex_sessions.py --source archived
Return JSON:
bash
python3 scripts/list_codex_sessions.py --json
Default table columns:
idprojectstarted_atupdated_atsourcetitleWith --details, also show:
matched_frommatched_tocwdproject_pathstarted_atsession_filefirst_user_messagerg because session_index.jsonl may be incomplete.id and cwd.started_at and updated_at are displayed in local time, not raw Z time.cwd.Use:
bash
python3 scripts/list_codex_sessions.py --help