codex-session-explorer
v0.1.0
Published
Read-only CLI for exploring Codex/OpenAI session history
Downloads
5
Readme
openai-session-explorer
Read-only CLI for exploring local Codex/OpenAI session history.
ose is the Codex sibling of cse: it reads ~/.codex/state_5.sqlite as the primary
thread index, then streams the rollout JSONL path recorded in SQLite for message, tool,
search, and export commands.
Install
pnpm install
pnpm build
pnpm link --globalRequires the sqlite3 command-line binary. OSE opens Codex databases with sqlite3 -readonly;
it does not use immutable=1 because live Codex databases are WAL-mode and can change while
OSE is reading them.
Usage
ose list --pretty
ose list --project /path/to/repo --limit 20
ose show <thread-id>
ose show <thread-id> --raw
ose messages <thread-id> --user
ose tools <thread-id>
ose files <thread-id>
ose search "migration" --all --context 1
ose projects --pretty
ose stats
ose history --search deploy
ose tokens <thread-id>
ose export <thread-id> --format md --stdoutData Sources
state_5.sqlite: canonical thread metadata and rollout pathssessions/YYYY/MM/DD/*.jsonl: full session event streamarchived_sessions/*.jsonl: archived rollout streamshistory.jsonl: narrow prompt history onlylogs_2.sqlite: optional diagnostics, not session reconstruction
Design
- JSON output by default,
--prettyfor tables - Read-only SQLite access with loud failures
- No fallback to incomplete JSON indexes
- Streams JSONL instead of loading whole session files when possible
