mcpField
C
codex-history

codex-history

github.com/arthurzakirovAgent workflows1163 installsUpdated 2w ago
Repository

About codex-history

Codex History is a skill for finding and reviewing prior work in OpenAI Codex CLI conversation history. It searches prompt indexes, uses session logs when available, and helps identify where a task stopped before continuing.

Key features

  1. 01Search prompts by keyword
  2. 02Find sessions by ID
  3. 03List recent sessions
  4. 04Read optional session logs
  5. 05Summarize unfinished work

Use cases

  1. 01Finding an earlier discussion by topic
  2. 02Reviewing the latest Codex CLI sessions
  3. 03Continuing work from a previous Codex session

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/arthurzakirov/agentdesk --skill codex-history

After installing, type/codex-historyin Claude Code to confirm it loaded.

Details

From the project README

Codex History

Resume work started in OpenAI Codex CLI by reading its conversation history.

Data Locations

There are two history.jsonl files and, depending on Codex version, session files or SQLite state:

SourcePathContent
Global prompt index~/.codex/history.jsonlUser prompts with session_id links
Per-project prompt index<project-root>/.codex/history.jsonlSame format, scoped to one repo
Session logs (legacy)~/.codex/sessions/YYYY/MM/DD/rollout-<timestamp>-<uuid>.jsonlFull conversations
SQLite state~/.codex/state_5.sqliteNewer storage, may contain thread data

Session files may not exist in newer versions, so prefer history.jsonl first and treat session JSONL as an optional richer source.

Workflow

Step 0: Search By Keyword

When the user describes the chat by topic rather than session ID, search prompt text across the global and per-project history files.

Step 1: Search By Session ID

Check both global and per-project history files because the session may have started in another repo.

Step 2: List Recent Sessions

If the user does not know which session they want, show recent prompts with timestamps and session IDs.

Step 3: Try To Find A Session JSONL File

If a matching session log exists, use it for richer extraction. Do not fail the workflow if it does not exist.

Step 4: Extract Conversation
  • If a session JSONL exists, extract user and assistant messages plus relevant tool calls.
  • If it does not, reconstruct the task flow from history.jsonl entries for the same session_id.
Step 5: Pick Up The Work

After reading the history:

  1. Summarize what Codex was working on.
  2. Note incomplete steps or terminal errors.
  3. Confirm what the user wants to continue.
  4. Resume from the last useful state.

Tips

  • Session logs can be large, so extract rather than reading raw JSONL manually.
  • cwd metadata is useful for locating the repo Codex worked in.
  • If the user says "continue from codex" without specifics, start by showing recent sessions.

Comments

Markdown supported