Skip to content

Releases: MeXenon/codex-session-export

Codex Session Export v2.6.3 - Session Lookup and Input Fixes

Choose a tag to compare

@MeXenon MeXenon released this 05 Jul 00:02

Codex Session Export v2.6.3 - Session Lookup and Input Fixes

This patch improves session discovery and fixes browser selection editing.

Fixes

  • Finds sessions stored as raw response item messages as well as event message wrappers.
  • Includes subagent metadata and related parent/session IDs in lookup.
  • Searches full session IDs, rollout filenames, full paths, and long prefixes more reliably.
  • Fixes selection input where Backspace could leave the first typed digit visible.
  • Updates the displayed version to v2.6.3.

Validation

  • python -m py_compile codex-md.py
  • git diff --check
  • Exact lookup for 019f29db-028c-7161-a357-e7919aff1101 resolves the primary session
  • Simulated selection edit and Backspace sequence returns the expected value

Codex Session Export v2.6.2 — Safer Exports and Session ID Lookup

Choose a tag to compare

@MeXenon MeXenon released this 26 Jun 18:46

Codex Session Export v2.6.2 — Safer Exports and Session ID Lookup

This release improves the export finish flow and makes it easier to jump directly to a known session.

What's New

  • Added save-location selection for file exports: script directory, selected session project directory, or custom directory.
  • Added existing-file handling with overwrite, rename, or skip. Overwrite is the default.
  • Added session lookup by full session ID, rollout filename, or long ID prefix from the session browser.
  • Added a post-save choice to open the Markdown file or reveal the output folder using the native OS file manager.
  • Updated README documentation for the new export flow.

Validation

  • python -m py_compile .\codex-md.py
  • git diff --check
  • Mocked export conflict test for rename behavior
  • Session ID lookup smoke test

Codex Session Export v2.6.0 — Project View, Pagination & Arrow-Key Navigation

Choose a tag to compare

@MeXenon MeXenon released this 07 Jun 01:33

🗂️ Codex Session Export v2.6.0 — Project View, Pagination & Arrow-Key Navigation

This is the biggest upgrade to the session browser yet. Until now the tool opened onto a single flat wall of your most recent sessions — fine for a handful of threads, painful once you live in Codex across dozens of projects. v2.6.0 rebuilds the entire browsing experience around projects and pagination, the way Codex Desktop does it, so finding the exact thread you want is finally effortless.

✨ What's New

🗂️ Project View
Your sessions are now grouped by project (their working directory), exactly like Codex Desktop. Flip between two modes with a single key:

  • All Sessions — the familiar newest-first list, now with a Project column so you always know where each thread came from.
  • Projects — every project you've worked in, with its session count and when it was last active. Open one to drill straight into just that project's threads, then jump back out with b.

📄 Pagination
No more hidden sessions or endless scrolling. Both the session list and the project list are now cleanly paged with a live Page X / Y indicator — whether you have 20 sessions or 2,000, everything stays readable.

⌨️ Arrow-Key Navigation
Page through your history with the ←/→ (or ↑/↓) arrow keys. Every menu command is now a single keypress — no Enter required — so moving around is instant. (n / p still work as aliases, and you type a number only when selecting what to export.)

🚀 Under the Hood

  • Sessions are scanned once and reused, so the menu is noticeably snappier between exports.
  • Smarter project grouping that correctly merges the same folder regardless of drive-letter case or trailing slashes.

📦 Usage

Same as always — pure Python, zero dependencies:

python codex-md.py

Everything from previous versions — 20 filterable sections, Last N Turns, Live Context, presets, clipboard export — works exactly as before.

If this tool saves your context window (or your sanity), a ⭐️ on the repo means a lot!

Codex Session Export v2.5.2 - Reliable Filter Scrolling

Choose a tag to compare

@MeXenon MeXenon released this 06 Jun 14:27

🐛 Fixed

  • Filter menu scrolling now reliable in every terminal size. Previously, scrolling up/down in the interactive Section Filter caused duplicated/leftover rows ("extra writes") to pile up, because the whole menu was redrawn into the terminal's scrollback on terminals shorter than the list.

✨ How it's fixed

  • Alternate screen buffer (htop/vim/less style): the filter UI now renders on its own surface and never leaks frames into your scrollback. On exit, the terminal restores exactly to its previous state.
  • Internal viewport: the menu measures the terminal height and renders only the rows that fit, paging around the cursor instead of overflowing.
  • ▲ / ▼ indicators show when there are more rows above or below, so navigation stays clear on both small and large terminals.

Tested on short and tall terminals: no extra writes, bounded frame height, and clean restore on exit. Zero new dependencies.

Codex Session Export v2.5.1 - TUI Smooth Rendering

Choose a tag to compare

@MeXenon MeXenon released this 16 May 17:54

✨ What's New in v2.5.1

  • TUI Smooth Rendering: Replaced screen-clearing approach with standard ANSI double-buffering. Completely eliminated UI flickering/blinking when navigating the filter menu. Relies purely on native terminal capabilities with zero external dependencies.

Codex Session Export v2.5 - Live Context Engine

Choose a tag to compare

@MeXenon MeXenon released this 14 May 13:35

✨ What's New in v2.5

  • Live Context Extraction ([C] Option): The script now dynamically parses raw Codex telemetry to perfectly reverse-engineer the model's active memory. It handles Undo/Rollback events and legacy/new Compaction cycles so you extract the exact active window. It also reads the active model limits dynamically (e.g. 258k/1M).
  • Real-Time Token Usage: See your exact live token capacity straight from the CLI before exporting.
  • Full Session Bug Fix: Fixed a critical bug in earlier versions where selecting 'Full Session' could cause the program to crash on extremely large JSON files.
  • Legacy Compaction Support: Enhanced safety measures for handling missing replacement histories in legacy compactions.

v2.4.0 — Last N Turns Extraction Scope

Choose a tag to compare

@MeXenon MeXenon released this 20 Apr 15:20

What's New in v2.4.0

Last N Turns Extraction Scope

Sometimes you only want to extract the most recent interactions instead of the entire session history. With the new Extraction Scope feature, you are now prompted immediately after selecting a session to optionally limit the export to the Last N Turns.

What is a "Turn"?
A turn is defined as one user message plus all the agent work that followed it (reasoning, tool calls, outputs, and agent responses). This is the most natural way to slice an interaction, guaranteeing you get the complete context for the selected prompts without dragging in old history.


Install / Update

🐧 Linux / 🍎 macOS:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python3 codex-md.py

🪟 Windows — Command Prompt:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python codex-md.py

🪟 Windows — PowerShell 7:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py" -OutFile "codex-md.py"; python codex-md.py

v2.3.0 — Message Count & Internal Reasoning Cap

Choose a tag to compare

@MeXenon MeXenon released this 13 Apr 17:18

What's New in v2.3.0

Accurate Message Counts in UI

When filtering chat items (👤 User, 🤖 Agent, 🧠 Agent Reasoning, 🔒 Internal Reasoning), you will now see the explicit number of block/messages next to the total line count in the UI. For instance:
🤖 Agent Messages ··········· 10,168 (45 Msg)
This makes it incredibly easy to know exactly how many conversational turns you are currently including vs. filtering out, independent of their raw token length.

Internal Reasoning Cap

We've split reasoning into 🧠 Agent Reasoning and 🔒 Internal Reasoning, giving you discrete granular controls for each via the UI using the ◀/▶ keys!


Install / Update

🐧 Linux / 🍎 macOS:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python3 codex-md.py

🪟 Windows — Command Prompt:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python codex-md.py

🪟 Windows — PowerShell 7:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py" -OutFile "codex-md.py"; python codex-md.py

v2.2.1 — Smoother Message Cap Steps

Choose a tag to compare

@MeXenon MeXenon released this 13 Apr 13:10

What's New in v2.2.1

Smoother message cap progression

The per-type message caps (👤 User, 🤖 Agent, 🧠 Reasoning) now step through values more gradually between 10 and 100, instead of jumping too coarsely.

New step sequence:
ALL → 5 → 10 → 20 → 30 → 40 → 50 → 60 → 70 → 80 → 90 → 100 → 150 → 200 → 300 → 500


Install / Update

🐧 Linux / 🍎 macOS:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python3 codex-md.py

🪟 Windows — Command Prompt:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python codex-md.py

🪟 Windows — PowerShell 7:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py" -OutFile "codex-md.py"; python codex-md.py

v2.2.0 — Windows Compatibility

Choose a tag to compare

@MeXenon MeXenon released this 13 Apr 12:54

What's New in v2.2.0

Full Windows Support

The script now runs natively on Windows without any extra dependencies. Previously, import tty and import termios (Unix-only modules) caused an immediate crash on Windows.

Changes:

  • Replaced Unix-only tty / termios imports with a conditional block — they are only loaded on Linux/macOS
  • Added a Windows keyboard handler using the built-in msvcrt module (no pip install needed)
  • os.system('clear') replaced with a cross-platform _clear_screen() that uses cls on Windows
  • Clipboard copy already worked on Windows via clip.exe — no change needed there
  • Zero change in functionality or UI — everything works identically across all platforms

Install / Update

🐧 Linux / 🍎 macOS:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python3 codex-md.py

🪟 Windows — Command Prompt:

curl -sO https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py && python codex-md.py

🪟 Windows — PowerShell 7:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MeXenon/codex-session-export/main/codex-md.py" -OutFile "codex-md.py"; python codex-md.py