zero-yx/static_flow / skills/codex-session-history
codex-session-history
UnverifiedSearch Codex local session history stored in SQLite and session_index.jsonl. Use this skill when the user wants to list, search, filter, or inspect locally saved Codex sessions by session id, provider, time range, preview text, thread name, or archived status.
Codex Session History
Use the bundled CLI to inspect local Codex session history. The script reads:
state_*.sqlitefor persisted thread metadatasession_index.jsonlfor the latest user-facing thread names
The script auto-discovers the newest state database under CODEX_SQLITE_HOME, the configured sqlite_home, or ~/.codex.
Primary Command
Run:
python3 scripts/codex_session_history.py --limit 30
The default cards view shows:
- full
session_id - provider and source
- created and updated timestamps
- thread name, title, and preview
- cwd
- a ready-to-run
codex resume <session_id>command
Common Queries
Search by preview, title, id, provider, cwd, or thread name:
python3 scripts/codex_session_history.py --query "resume provider"
Show the newest sessions in a compact table:
python3 scripts/codex_session_history.py --view table --limit 50
Filter by provider:
python3 scripts/codex_session_history.py --provider openai --provider staticflow
Filter by time:
python3 scripts/codex_session_history.py --since 7d
python3 scripts/codex_session_history.py --sort-by created --since 2026-03-01 --until 2026-03-10
Include archived-only sessions:
python3 scripts/codex_session_history.py --archived only
Emit JSON for piping or ad hoc analysis:
python3 scripts/codex_session_history.py --view json --limit 200
Time Filters
--since and --until accept:
- ISO timestamps like
2026-03-23T15:30:00 - dates like
2026-03-23 - epoch seconds
- relative values like
30m,12h,7d,2w today,yesterday,now
Notes
previewis the stored first user message, not a generated conversation summary.thread_namecomes fromsession_index.jsonland may be missing.- If the user wants to continue a session after locating it, run
codex resume <session_id>. - If auto-discovery fails, pass
--db /path/to/state_5.sqliteor--codex-home /path/to/.codex.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 117k | Updated | Claude CodeCodex | Unverified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 117k | Updated | Claude CodeCodex | Unverified | Install |