← 返回
未分类 中文

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...
通过读取 `~/.codex/session_index.jsonl`、`~/.codex/sessions/` 和 `~/.codex/archived_sessions/`,列出并检查本地 Codex 会话历史,默认...
sube-py
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 329
下载
💾 0
安装
1
版本
#latest

概述

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

  1. Run the script to collect unarchived sessions by default.
  2. Use session_meta.payload.id as the canonical session id.
  3. Use session_meta.payload.cwd as the workspace anchor.
  4. Derive the project from the Git root when possible; otherwise fall back to cwd.
  5. Use session_index.jsonl only as enrichment for thread_name and updated_at.
  6. Convert stored UTC timestamps into local time before display and time-window filtering.
  7. If no thread_name is 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:

  • id
  • project
  • started_at
  • updated_at
  • source
  • title

With --details, also show:

  • matched_from
  • matched_to
  • cwd
  • project_path
  • started_at
  • session_file
  • first_user_message

Notes

  • Prefer the script over ad hoc rg because session_index.jsonl may be incomplete.
  • Treat the session file itself as the source of truth for id and cwd.
  • started_at and updated_at are displayed in local time, not raw Z time.
  • 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 10:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Check Workday CN

sube-py
判断今天(或指定日期)是否为中国大陆工作日,通过从 jsDelivr 获取 holiday-cn 年度 JSON 并应用假期/调休规则。
★ 0 📥 532

PDFlux Test

sube-py
将非结构化文档转为LLM可用的结构化数据,支持PDF、Word、PPT、图片;提取段落、公式、表格、图表等...
★ 1 📥 377

Sube Test

sube-py
将非结构化文档转为LLM可用的结构化数据,支持PDF、Word、PPT、图片;提取段落、公式、表格、图表等...
★ 0 📥 321