codex-history

Manage local Codex conversation history via a CLI for listing, previewing, exporting, archiving, recovering, and deleting sessions.

53|3|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Sworddust/codex-history --skill codex-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-history
Source: https://github.com/Sworddust/codex-history/tree/main
Command: npx skills add https://github.com/Sworddust/codex-history --skill codex-history

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Codex History Skill helps you manage local Codex conversation history across sessions, including listing, previewing, exporting, archiving, recovering, and deleting, while keeping history.jsonl in sync.

Core Features & Use Cases

  • List active sessions with filtering for archived/all
  • Preview, export, archive, recover, and delete sessions
  • Export sessions to Markdown while syncing history.jsonl
  • Safe operations with force/confirm-like prompts and conflict handling

Quick Start

Run node scripts/history-cli.js list to view your recent sessions.

Frequently Asked Questions about codex-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export Codex conversation history to Markdown?

You can export Codex conversation history to Markdown by running the CLI with an explicit session-id. The tool syncs history.jsonl during the export, ensuring your local session data remains consistent in both JSON and human-readable formats.

Can I preview and archive Codex sessions from the command line?

Yes, you can preview and archive Codex sessions directly from the command line. The CLI requires an explicit session-id for these actions and safely manages both active and archived data without operating outside your current project directory.

How do I list my recent Codex CLI sessions?

You list recent Codex CLI sessions by executing the history list command. This displays your active sessions and supports filtering to show all or archived records, providing output in either JSON or human-readable formats.

Is it safe to delete Codex conversation sessions locally?

Deleting Codex conversation sessions locally is safe because the CLI enforces a strict, whitelisted command surface and uses force or confirm-like prompts. It requires an explicit session-id to prevent accidental data loss and keeps history.jsonl synchronized.

Does Codex history management work without external dependencies?

Codex history management works entirely through local Node.js scripts without external dependencies. It restricts operations to the current project directory, enforcing a strict command surface to prevent unintended modifications to your session archives.

Why does recovering an archived Codex session require a session-id?

Recovering an archived Codex session requires an explicit session-id to enforce strict, safe operations. This whitelisted command surface prevents accidental modifications and ensures history.jsonl remains synchronized when moving data between active and archived states.