Skip to content
Agentmart
Submit a tool

codex-session-recovery

Find local Codex sessions read-only and provide CLI recovery commands.

Skill by wufei-png

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/wufei-png-codex-session-recovery

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Find local Codex sessions read-only and provide CLI recovery commands. Use for missing history, prior thread lookup, resume or fork help, and explicitly requested Desktop visibility.

Use cases: productivity, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/codex-session-recovery

What's inside

Skill name
codex-session-recovery
Description
Find local Codex sessions read-only and provide CLI recovery commands. Use for missing history, prior thread lookup, resume or fork help, and explicitly requested Desktop visibility.
License
MIT
Instructions
41 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • body: contains an absolute path from the author's machine

Files (4)

  • SKILL.md
  • openai.yaml · agents/
  • desktop.md · references/
  • scan_codex_sessions.py · scripts/

SKILL.md (first lines)

# Codex Session Recovery

Recover access to local Codex history without mutating live state by default.

## Safety

- Read local Codex JSONL only. Prefer copied fixtures or temporary copies for testing.
- Exclude archived and subagent sessions unless requested. Show only short prompt snippets unless the user requests more.
- Never edit `$CODEX_HOME`, SQLite-backed state, rollout files, or provider or account metadata. Never copy or import JSONL into live Codex state.
- Do not create or manage Desktop threads unless the user explicitly requests Desktop visibility. A Codex Desktop context is not enough.

## Find sessions

Use the bundled scanner. Resolve `<skill-directory>` from this loaded skill's location; do not assume it is installed under `$CODEX_HOME/skills`.

```bash
python "<skill-directory>/scripts/scan_codex_sessions.py" \
  --codex-home "${CODEX_HOME:-$HOME/.codex}" \
  --cwd "/Users/example/project" \
  --since "2026-06-10" \
  --timezone "Asia/Shanghai" \
  --format table
```

From this repository checkout:

```bash
python skills/productivity/codex-session-recovery/scripts/scan_codex_sessions.py \
  --codex-home /tmp/copied-codex-home \
  --format json
```

Use `--help` for all options. The main filters are `--cwd`, `--since`, `--until`, `--timezone`, and `--query`; archived sessions, subagents, prompt snippets, unknown-time records under date filters, and index-referenced paths require explicit flags (`--include-archived`, `--include-subagents`, `--show-prompts`, `--include-unknown-time`, and `--show-paths`). Prefer JSON when another tool consumes the result.

The index or transcript filename provides the canonical thread id; other observed `id`, `thread_id`, or `session_id` values are reported as aliases and merged into that record. Report its thread name, cwd, time, archived or subagent status, `match_score` and `matching_reasons` as given, source path, and exact `codex resume` and `codex fork` commands. The score ranks candidates within one search; it is not a probability or percentage and may exceed 100. The JSON field was renamed from `confidence` to `match_score`, with no old-field alias. If nothing matches, state the filters and suggest relaxing one at a time.

## Desktop visibility

A Codex Desktop context is not enough. When the user explicitly requests Desktop visibility and the candidate is unique or already selected, follow `references/desktop.md`. If the candidate is ambiguous, ask the user to choose first. Otherwise remain CLI-first.

From wufei-png/skills, MIT.

More from wufei-png/skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Sep 22, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from wufei-png

Cite this page

codex-session-recovery skill. Agent Mart. https://agentmart.dev/skills/wufei-png-codex-session-recovery (last updated 2026-10-24)