vincentkoc/dotskills

codex-session-recovery

Recover Codex or Claude sessions from tmux panes, saved cockpit snapshots, session history, and recent agent logs without overwriting useful restore evidence.

First seen Jul 29, 2026

Installation

$ npx skills add vincentkoc/dotskills --skill codex-session-recovery

Summary

  • Recover Codex or Claude sessions from tmux panes, saved cockpit snapshots, session history, and recent agent logs without overwriting useful restore evidence.
  • Use when a pane crashes, detaches, loses visible context, needs a resume command, or requires a safe targeted restore plan.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from vincentkoc/dotskills · top by installs.

npx skills add vincentkoc/dotskills

Browse all from vincentkoc/dotskills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 102
License LICENSE
Default branch main
Open issues 4
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT
Declared agents codex
More metadata
source
https://github.com/vincentkoc/dotskills

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,587 B
  • docs SUMMARY.md 312 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Codex Session Recovery

Purpose

Recover crashed, detached, or confusing agent sessions while preserving the best restore source.

When to use

  • Recover a Codex, Claude, or tmux cockpit session.
  • Find an exact codex resume <id> command.
  • Preview or restore saved pane/window/session state.
  • Repair missing snapshot history or tmux menu bindings.

Workflow

  1. Preserve evidence before writing state.

- Do not create a new snapshot until the restore candidate is known. - Do not run repair commands that overwrite history. - Set a recovery pane title when possible.

  1. Inspect live tmux state.

- tmux display-message -p '#S:#I.#P #{panecurrentcommand} #{panecurrentpath}' - tmux list-panes -a -F '#S:#I.#P #{panepid} #{panecurrentcommand} #{panecurrent_path}' - Inspect relevant key bindings before re-sourcing tmux configuration.

  1. Inspect available recovery sources.

- Prefer the operator's snapshot/history helper when installed. - Inspect recent ~/.codex/sessions/YYYY/MM/DD/*.jsonl metadata for session IDs and working directories. - Cross-check pane PIDs, cwd, and recent logs before selecting a session.

  1. Produce a dry-run plan first.

- Prefer one-pane or one-window restore over whole-session restore. - Show the snapshot or session ID, target pane, and exact command.

  1. Execute only with clear intent.

- Require explicit intent before restore commands that mutate tmux state. - Never kill broad Codex, Claude, tmux, or terminal processes from name matches alone. - Restrict cleanup to the exact pane, PID, process group, or current-task resource.

  1. Stay narrow for session-ID requests.

- Return the concrete ID and codex resume <id> first. - Add the broader recovery method only when requested.

Inputs

  • Optional tmux pane or window target.
  • Optional saved snapshot path.
  • Optional mode: session-ID lookup, preview, targeted restore, or menu repair.
  • Optional local snapshot helper such as tt.

Outputs

  • Exact resume command when available.
  • Selected restore source and target.
  • Dry-run restore plan before execution.
  • Concise blocker when evidence is insufficient.