You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ Because it’s a pure Python CLI tool, it's completely **portable**. You can use
41
41
-**Dynamic Output Capping:** Terminal payloads can be hundreds of thousands of lines long. Instantly cap output blocks to exactly 1, 5, 8, 10, or up to 500 lines to keep your context windows lean.
42
42
-**Granular Message Filtering:** Independently control how many of the last N blocks you want from each message type — 👤 User, 🤖 Agent, 🧠 Agent Reasoning, and 🔒 Internal Reasoning — all separately adjustable with `◀`/`▶`. Each defaults to showing all, so you only cut what you need.
43
43
-**Last N Turns *(New in v2.4)*:** Don't need the full session? Select only the most recent N turns to export. A "turn" is one user message plus all the agent work that followed (reasoning, tool calls, outputs, responses). Perfect for extracting just the last few interactions without wading through the entire history.
44
+
-**Live Context *(New in v2.5)*:** Want to see *exactly* what the LLM is seeing right now? The "Live Context" option parses the raw JSON logs to reverse-engineer Codex's memory state. It dynamically tracks the model's exact context limit (e.g. 258k), displays real-time token usage, resolves all your `Undo`/`Rollback` actions, and processes session compactions so you export the strict active memory window.
44
45
-**"Clean Chat" Mode:** Instantly strips messy IDE background data, active-file streams, and open-tab XML that the agent silently attaches to your prompt, leaving just your actual words.
45
46
-**7 Built-in Presets:** Jump straight to "Chat Only", "Terminal Only", "Outputs Only", or "Full Export" with a single keystroke.
46
47
-**Real-Time Context Math:** See exactly how many lines you are selecting *before* you export, complete with a live progress bar.
@@ -87,7 +88,8 @@ python codex-md.py
87
88
1.**Select a session:** The script automatically scans `~/.codex/sessions` and presents a chronological list of your recent threads. Type the ID of the session (e.g., `1`) or select multiple (e.g., `1,2,3`).
88
89
2.**Choose extraction scope:**
89
90
***[F] Full Session** — Export all turns (default).
90
-
***[L] Last N Turns** — Enter a number and only the most recent N turns are included. The session info shows how many turns are available.
91
+
***[L] Last N Turns** — Enter a number and only the most recent N turns are included.
92
+
***[C] Live Context** — Parses the log to extract the exact active context window (automatically resolving undo rollbacks and session compactions). Token usage relative to the model's limit (e.g. `197k/258k`) is displayed dynamically in the UI.
91
93
3.**Filter & Refine:**
92
94
*`↑` / `↓` - Navigate the filter list
93
95
*`Enter` / `Space` - Toggle a section ON/OFF
@@ -114,4 +116,6 @@ python codex-md.py
114
116
115
117
When pushing AI to its limits, the conversation log becomes your most valuable codebase asset. This tool guarantees you have complete ownership, visibility, and control over that data.
116
118
119
+
*Note: In previous versions, selecting 'Full Session' could sometimes cause the program to crash on very large JSON logs. This has been fully resolved.*
120
+
117
121
*If this tool saved your context window (or your sanity), **please give it a ⭐️!***
0 commit comments