/install codex-session-history
Codex Session History
Overview
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.
Workflow
- Run the script to collect unarchived sessions by default.
- Use
session_meta.payload.idas the canonical session id. - Use
session_meta.payload.cwdas the workspace anchor. - Derive the project from the Git root when possible; otherwise fall back to
cwd. - Use
session_index.jsonlonly as enrichment forthread_nameandupdated_at. - Convert stored UTC timestamps into local time before display and time-window filtering.
- If no
thread_nameis available, fall back to the first user message summary.
Commands
List recent sessions:
python3 scripts/list_codex_sessions.py
List active and archived sessions together:
python3 scripts/list_codex_sessions.py --source all
List more rows:
python3 scripts/list_codex_sessions.py --limit 50
Filter by project:
python3 scripts/list_codex_sessions.py --project PlayGround
Filter by a local time window on today's date:
python3 scripts/list_codex_sessions.py --from 11:00 --to 12:00
Filter by a local time window on a specific date:
python3 scripts/list_codex_sessions.py --date 2026-03-19 --from 11:00 --to 12:00
Inspect one session id:
python3 scripts/list_codex_sessions.py --session-id 019ce206-aa11-7c81-a65a-fece3708ecf4 --details
Only show archived sessions:
python3 scripts/list_codex_sessions.py --source archived
Return JSON:
python3 scripts/list_codex_sessions.py --json
Output
Default table columns:
idprojectstarted_atupdated_atsourcetitle
With --details, also show:
matched_frommatched_tocwdproject_pathstarted_atsession_filefirst_user_message
Notes
- Prefer the script over ad hoc
rgbecausesession_index.jsonlmay be incomplete. - Treat the session file itself as the source of truth for
idandcwd. started_atandupdated_atare displayed in local time, not rawZtime.- Time-window filters match actual session events inside the requested interval, not only broad session span coverage.
- If a workspace no longer exists on disk, still report the recorded
cwd. - When the user only asks for "有哪些会话、id 是什么、属于哪个项目", the default table is enough.
Script
Use:
python3 scripts/list_codex_sessions.py --help
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install codex-session-history - 安装完成后,直接呼叫该 Skill 的名称或使用
/codex-session-history触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Codex Session History 是什么?
List and inspect local Codex session history by reading `~/.codex/session_index.jsonl`, `~/.codex/sessions/`, and `~/.codex/archived_sessions/`. Default to u... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 102 次。
如何安装 Codex Session History?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install codex-session-history」即可一键安装,无需额外配置。
Codex Session History 是免费的吗?
是的,Codex Session History 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Codex Session History 支持哪些平台?
Codex Session History 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux)。
谁开发了 Codex Session History?
由 Sube(@sube-py)开发并维护,当前版本 v1.0.0。