Convert local Codex session archives from ~/.codex/sessions into readable Markdown transcripts.
The converter reads a Codex .jsonl session file and renders:
- user messages
- Codex messages
- shell commands run
- command status, exit code, and captured output
This is useful when you want a readable record of a Codex session after restarting your machine, resuming a session, or closing the TUI.
Here's an example of working on some changes on Codex Convos itself.
Below you can see part of the exported conversation, Codex comments in yellow, user comments in blue.
It collapses low value read/discovery "noise" commands (such as sed, rg etc) which it uses to read files and those are then viewable by expanding the section.
Other more useful commands to view are not shown in a collapsed area.
codex_session_to_markdown.py: converts one Codex session.jsonlfile into Markdownlist-codex-convos.sh: prints recent Codex session.jsonlfiles using cached AI summaries fromcodex-historyget-codex-convo.sh: exports a chosen session, or the newest matching one by defaultlist-and-open-codex-convo.sh: interactivefzfpicker that exports the selected session and opens it~/.cache/codex-convos/convos/: default output directory for generated Markdown transcripts
- Python 3
- Codex CLI sessions already present under
~/.codex/sessions fzfif you want the interactivegetccselector function- optional:
codex-historyinstalled, by default at~/Projects/codex-history
If codex-history is available, codex-convos uses its cached AI summaries for the picker labels.
If it is not available, codex-convos falls back to the original behavior of showing the first user prompt.
You can override the default codex-history location by setting CODEX_HISTORY_REPO.
The scripts are intended to work on both Linux and macOS.
--openprefers Google Chrome on both platforms and falls back to the platform default opener if Chrome is unavailable- the
getccshell helper below is written to work inzshas well asbash
Add this to your shell config, for example ~/.bashrc or ~/.zshrc and change ~/Projects/codex-convos as needed:
function getcc() {
~/Projects/codex-convos/list-and-open-codex-convo.sh --days 14
}After reloading your shell:
getccThat shows the 10 most recent session files in fzf, lets you choose one, then exports it to:
~/.cache/codex-convos/convos/<same-session-name>.md
The fzf list is newest-first, with the newest session at the top and initially selected. The orange timestamp shown is the session file's modified time, so the displayed order matches the sort order. Each entry is shown like:
12th Apr @ 14:59:32 : Investigated ai-chat-service authorization failures across token, config, and SDK env.
On selecting one of the Codex conversations it converts it to Markdown and opens it in Chrome.
You can also run the wrapper directly:
~/Projects/codex-convos/list-and-open-codex-convo.sh --days 14
~/Projects/codex-convos/list-and-open-codex-convo.sh --days 30 --limit 50Export the newest available session file:
~/Projects/codex-convos/get-codex-convo.shConvert a specific session file:
~/Projects/codex-convos/get-codex-convo.sh \
~/.codex/sessions/2026/04/11/<filename>.jsonlExport a session and open the generated Markdown in Chrome:
~/Projects/codex-convos/get-codex-convo.sh --open \
~/.codex/sessions/2026/04/11/<filename>.jsonlList the 10 newest session files with a readable label and the underlying path:
~/Projects/codex-convos/list-codex-convos.sh
~/Projects/codex-convos/list-codex-convos.sh --days 7
~/Projects/codex-convos/list-codex-convos.sh --limit 20 --refreshWhen codex-history is present:
--days Nonly considers sessions from the lastNdays--limit Nchanges how many recent sessions are listed--refreshforces the AI summary cache to be regenerated instead of reusing any cached summary
When codex-history is not present:
codex-convosfalls back to its original first-prompt labels--days Nand--limit Nstill work in that fallback mode--refreshis accepted but has no effect in fallback mode, because there is no AI summary cache to refresh
Argument behavior in both modes:
- no
--daysand no--limitmeans--days 14 --limit 1000 --days Nwith no--limitmeans every session in the lastNdays--limit Nwith no--daysmeans the most recentNsessions with no day filter--days N --limit Mmeans sessions in the lastNdays capped atM
Export the newest session within a date window:
~/Projects/codex-convos/get-codex-convo.sh --days 7
~/Projects/codex-convos/get-codex-convo.sh --days 30 --limit 20 --openIf you want direct control of the underlying Python converter, it still works:
python3 ~/Projects/codex-convos/codex_session_to_markdown.py \
~/.codex/sessions/2026/04/11/<filename>.jsonl \
-o ~/.cache/codex-convos/convos/session.mdYou can also skip command history and export only the conversation:
python3 ~/Projects/codex-convos/codex_session_to_markdown.py \
~/.codex/sessions/2026/04/11/<filename>.jsonl \
--skip-commands \
-o ~/.cache/codex-convos/convos/session.md