codex-session-manager
Skill139 starsChanged 9 months agoMITView on GitHub
Manage local Codex session transcripts, including listing candidate sessions, exporting full or selected sessions to organized Markdown, inspecting archived sessions, and summarizing tool-call history. Use when the user asks to scan, parse, archive, inspect, recover, summarize, manage, or convert Codex sessions, `~/.codex/sessions` data, `~/.codex/archived_sessions` data, `.jsonl` transcripts, tool-call history, or hard-to-read Codex conversation logs.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- OpenCoven/coventheir own version, first seen Jul 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- OpenCoven/coven★ 75same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-feishuSkill
- claude-session-managerSkill
- codex-cliSkill
- cover-designSkill
- cover-imageSkill
- diagram-to-imageSkill
- fpl-copilotSkill
- interactive-inputSkill
- mining-session-skillsSkill
- Next.js Security ScanSkill
- personal-chinese-writing-styleSkill
- producing-videoSkill
- promote-postSkill
- publish-substack-articleSkill
- publish-x-articleSkill
- publish-zsxq-articleSkill
- Python Security ScanSkill
- share-readingSkill
- slides-videoSkill
- subtitle-correctionSkill
- tweet-insightSkill
- video-plannerSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Default output folder: ~/.codex/session-markdown.
- Distinctive: line 21
Run from any directory:
- Distinctive: line 41
Use this flow when the user wants one Codex session, is unsure which session they need, or asks to inspect recent sessions before …
- Very specific: line 43
Run a candidate list command.
- Distinctive: line 52
If the user gave a date, session id fragment, or archive hint, pass it through the same filters:
- Very specific: line 64
After the user chooses a number, rerun with the exact same filters and --pick N.
- Very specific: line 66
If the user already gives an exact session id or unique fragment, use --mode specific --session <id-or-fragment> --list-candidates first …
- Distinctive: line 92
Ask the user to choose full mode or specific mode if they did not already make the choice.
- Distinctive: line 100
Treat transcript data as private.
- Very specific: line 101
Do not delete or modify original .jsonl files.
- Distinctive: line 102
Prefer sidecar tool details for large sessions.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex Session Manager
Overview
Codex stores session transcripts as JSONL files under ~/.codex/sessions/YYYY/MM/DD/*.jsonl. Archived sessions may also exist under ~/.codex/archived_sessions/*.jsonl. Use the bundled manager to list candidates or export sessions into Markdown transcripts with a digest, timeline, message text, and linked tool-call details.
Default output folder: ~/.codex/session-markdown. Tell the user before exporting there, and mention any custom output folder they requested.
Quick Start
Let the user's wording choose the mode when it is clear; otherwise ask them to choose before exporting:
- Full mode: export all matching sessions. Use this for archive, backup, broad search, or "convert all sessions" requests.
- Specific mode: list candidate sessions first, ask the user to pick one, then export only that session.
Run from any directory:
python3 /path/to/codex-session-manager/scripts/manage_codex_sessions.pyUseful options:
--mode full: export all matching sessions. This is the default.--mode specific --list-candidates: print a numbered candidate table and do not export.--mode specific --pick N: export the Nth candidate from the same filtered candidate list.--include-archived: also scan~/.codex/archived_sessions.--project <text>: only export date/project keys containing this text.--session <text>: only export sessions whose id or filename contains this text.--since YYYY-MM-DD: only export sessions modified on or after this date.--limit N: export the N most recently modified matching sessions.--include-tool-details-inline: embed full tool payloads in the main session Markdown instead of sidecar files.
Specific Mode Candidate Flow
Use this flow when the user wants one Codex session, is unsure which session they need, or asks to inspect recent sessions before converting.
- Run a candidate list command. Use
--limit 20by default unless the user asks for a different count.
python3 /path/to/codex-session-manager/scripts/manage_codex_sessions.py \
--mode specific \
--list-candidates \
--limit 20- If the user gave a date, session id fragment, or archive hint, pass it through the same filters:
python3 /path/to/codex-session-manager/scripts/manage_codex_sessions.py \
--mode specific \
--list-candidates \
--since 2026-06-01 \
--include-archived \
--limit 20- Present the numbered candidate rows to the user. The candidate table includes modified time, date/project key, short session id, cwd, and first user prompt excerpt.
- After the user chooses a number, rerun with the exact same filters and
--pick N.
If the user already gives an exact session id or unique fragment, use --mode specific --session <id-or-fragment> --list-candidates first when there is any ambiguity. Export with --pick 1 only when the candidate list has exactly one match.
Output Layout
The exporter writes:
~/.codex/session-markdown/
├── index.md
└── <date-or-archive-key>/
├── index.md
├── <session-id>.md
└── tool-details/
└── <session-id>.tools.mdEach session Markdown includes:
- Digest: source path, key, session id, cwd, timestamps, event/message/tool counts, and first user prompt excerpt.
- Linked tool details file when tool calls or results exist.
- Timeline: session metadata, user/assistant/developer messages, reasoning summaries, tool calls, and tool outputs.
- Short tool summaries inline, with full JSON payloads in the sidecar file by default.
Workflow
- Confirm the source folder. Default to
~/.codex/sessions; add--include-archivedwhen the user asks about archived sessions. - Ask the user to choose full mode or specific mode if they did not already make the choice.
- Confirm or announce the output folder. Default to
~/.codex/session-markdown. - For full mode, run the manager script with any needed filters.
- For specific mode, list candidates, get the user's chosen number, then export with
--pick. - Report the number of sessions exported, output index path, and any parse warnings.
Notes
- Treat transcript data as private. It can contain prompts, file contents, command output, secrets accidentally pasted into chat, and tool results.
- Do not delete or modify original
.jsonlfiles. - Prefer sidecar tool details for large sessions. Inline tool payloads can make Markdown hard to search and load.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

