This repository is first and foremost an automatic rewrite of the original Codex log viewer implementation into a browser-native frontend. Original project: timvw/codex-transcripts.
The primary deliverable is the JS/HTML/CSS viewer:
codex_log_viewer.jscodex_log_viewer.htmlcodex_log_viewer.css
- Reads Codex session JSONL logs directly in the browser.
- Supports both legacy and wrapped event lines (
{ "timestamp": ..., "payload": ... }). - Renders user/assistant/reasoning/function-call/function-output/token-usage blocks.
- Includes collapse/expand controls, filters, markdown rendering, and lightweight code highlighting.
- Falls back to embedded inline session data when fetch is blocked/unavailable.
- Set the source file in
codex_log_viewer.html:
<meta name="codex-log-source" content="example.jsonl" />- Serve the repo over HTTP:
python3 -m http.server 8000- Open:
http://localhost:8000/codex_log_viewer.html
Optional URL overrides:
http://localhost:8000/codex_log_viewer.html?source=example.jsonl
http://localhost:8000/codex_log_viewer.html?source=example.jsonl&title=Codex%20Session%20Log
http://localhost:8000/codex_log_viewer.html?source=example.jsonl&showTokenUsage=true
http://localhost:8000/codex_log_viewer.html?source=example.jsonl&collapseOutputCharThreshold=15000&collapseOutputLineThreshold=300
Notes:
sourceis resolved relative tocodex_log_viewer.html.- Token usage blocks are hidden by default on initial page load; use the
Token Usagefilter checkbox (orshowTokenUsage=true) to show them. - If loaded from
file://, fetch may be blocked by browser security. Serve via HTTP. - If the HTML contains embedded inline session data, the viewer can render even when source fetch fails.
Exported session artifacts are stored in:
codex_sessions/codex_sessions/index.html(session export index page)
Naming scheme uses migration-style timestamps with meaningful suffixes, for example:
20260213134203_redacted_current_codex_session_jsonl_export.jsonl20260213134203_redacted_current_codex_session_jsonl_export.html
This repository includes a vendored Codex skill for conversation exports:
skills/conversation-log-export/SKILL.md
What this file is:
- The skill entrypoint documentation used by Codex to understand when and how to run the export workflow.
- The source of truth for workflow steps, filtering rules, and command examples for the export script.
Related files in the same skill:
skills/conversation-log-export/scripts/export_current_conversation.py(implementation)skills/conversation-log-export/agents/openai.yaml(skill metadata for agent UI/default prompt)
Current filtering behavior documented in SKILL.md:
- Drops
session_meta,turn_context,event_msg, andcompacted. - Keeps
event_msgrows wherepayload.typeistoken_count. - Drops
response_itemrows wherepayload.typeisreasoningorfunction_call_output. - Drops developer/system prompt
response_itemmessages. - Drops bootstrap AGENTS directives injected as user messages (
# AGENTS.md instructions for ...with<INSTRUCTIONS>...</INSTRUCTIONS>). - Default export filename is
<timestamp>_<goal-slug>.jsonl(no_conversation_onlysuffix). - If exactly one commit message title is generated, its first line is used to derive
<goal-slug>. - Supports selector overrides:
--include row:<type>,event:<type>,response:<type>,role:<role>--exclude row:<type>,event:<type>,response:<type>,role:<role>--list-typesto print observed selector values and default keep/drop status.
- Each export run refreshes
codex_sessions/index.htmlso new sessions appear automatically.
Run from this repository:
python3 skills/conversation-log-export/scripts/export_current_conversation.py --with-html
python3 skills/conversation-log-export/scripts/export_current_conversation.py --list-types
python3 skills/conversation-log-export/scripts/export_current_conversation.py --include row:event_msg,row:compacted
python3 skills/conversation-log-export/scripts/export_current_conversation.py --include response:reasoning,response:function_call_output- https://jerometremblay.github.io/codex_log_viewer/
- https://jerometremblay.github.io/codex_log_viewer/codex_sessions/20260213134203_redacted_current_codex_session_jsonl_export.html
LGPL 2.0