Agent skill

Codex Session Recovery

by vincentkoc in vincentkoc/dotskills

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

MITAuto-check passed

Install Codex Session Recovery

skills CLI
$ npx skills add vincentkoc/dotskills --skill codex-session-recovery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vincentkoc/dotskills codex-session-recovery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vincentkoc/dotskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codex-session-recovery .claude/skills/codex-session-recovery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codex-session-recovery
GitHub stars
107
Token cost
~808 tokens
SKILL.md length
283 words
Files
3 (incl. assets)
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 6 steps: Preserve evidence before writing state. → Inspect live tmux state. → Inspect available recovery sources. → …
  • Loses visible context
  • SKILL.md covers Purpose, When to use, Workflow and Inputs, plus 2 more sections
  • Calls codex

What it does

Codex Session Recovery is an agent skill from vincentkoc/dotskills. 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.

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including assets (for example `agents/openai.yaml`).

It works with tmux. The repository describes itself as: 🐙 A curated set of Codex and OpenClaw skills for workflow automation, technical debugging, and agent-assisted development patterns. The licence is MIT.

When your agent uses it

  • Loses visible context
  • Needs a resume command
  • Requires a safe targeted restore plan

Example prompts

  • “/codex-session-recovery”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Preserve evidence before writing state.
  2. Inspect live tmux state.
  3. Inspect available recovery sources.
  4. Produce a dry-run plan first.
  5. Execute only with clear intent.
  6. Stay narrow for session-ID requests.

What it can do on your machine

Read from SKILL.md and the folder at commit b83ca13. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codex Session Recovery loads about 808 tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 283 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~808

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vincentkoc/dotskills at commit b83ca13, republished under its MIT licence (© vincentkoc). 283 words, ~808 tokens.

Download SKILL.mdSave it as .claude/skills/codex-session-recovery/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
codex-session-recovery
description
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.
license
MIT
metadata.source
https://github.com/vincentkoc/dotskills

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.
  2. Inspect live tmux state.
    • tmux display-message -p '#S:#I.#P #{pane_current_command} #{pane_current_path}'
    • tmux list-panes -a -F '#S:#I.#P #{pane_pid} #{pane_current_command} #{pane_current_path}'
    • Inspect relevant key bindings before re-sourcing tmux configuration.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

Flow

mermaid
stateDiagram-v2
    [*] --> PreserveRestoreEvidence
    PreserveRestoreEvidence --> MatchSourceAndTarget
    MatchSourceAndTarget --> ReportUnknown: identity or source ambiguous
    MatchSourceAndTarget --> ReturnResumeID: session-ID lookup
    MatchSourceAndTarget --> ShowExactPlan: preview or recovery
    ShowExactPlan --> ReportPlan: preview only or mutation not authorized
    ShowExactPlan --> TargetedRecovery: exact mutation authorized
    TargetedRecovery --> VerifyTarget
    VerifyTarget --> ReportResult
    ReportUnknown --> [*]
    ReturnResumeID --> [*]
    ReportPlan --> [*]
    ReportResult --> [*]

© vincentkoc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (assets) in skills/codex-session-recovery of vincentkoc/dotskills.

  • SKILL.md
  • agents/openai.yaml
  • assets/icon.jpg

Open the folder on GitHubat commit b83ca13

Compare with similar skills

Codex Session Recovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codex Session Recovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex Session Recovery this skillvincentkoc/dotskills107—~808Automated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.9k14 repos~656Automated safety check: PassApache-2.0
CodeGraph Agent Evalcolbymchenry/codegraph74k—~950Automated safety check: PassMIT
Tmuxtrpc-group/trpc-agent-go1.9k23 repos~868Automated safety check: PassApache-2.0
CodexBar Live QAsteipete/CodexBar22k—~1.2kAutomated safety check: PassMIT
Tmuxopenclaw/openclaw392k1 repos~640Automated safety check: PassMIT

Similar skills

  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 14 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • CodeGraph Agent Eval

    colbymchenry/codegraph

    Benchmarks how much CodeGraph helps a coding agent on a real repository, comparing runs with and without it for a chosen local or published version.

    74k GitHub stars~950 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Tmux

    trpc-group/trpc-agent-go

    Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

    1.9k GitHub starsUsed in 23 repos~868 tokens
    Data & AnalyticsAuto-check passed
  • CodexBar Live QA

    steipete/CodexBar

    Runs live QA for the CodexBar app: provider usage matrix checks through its packaged CLI, config validation and menu checks, with 1Password-backed credentials handled safely.

    22k GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Tmux

    openclaw/openclaw

    Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.

    392k GitHub starsUsed in 1 repo~640 tokens
    Auto-check passed
  • Reproduces a feature from Codex or Claude Code in Qwen Code by running the reference agent under capture, reading the traces, then implementing matching behavior.

    28k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed

More from vincentkoc/dotskills

All 19 skills in this repo
  • Openclaw PR Batch Sweep

    vincentkoc/dotskills

    Select, review, repair, validate, and land batches of up to 20 low-risk OpenClaw contributor pull requests using Vincent's maintainer preferences and bounded sub-agent lanes.

    107 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Tmux Agent Lane Orchestrator

    vincentkoc/dotskills

    Monitor and coordinate one tmux agent lane, reconstruct worker state from panes and recent Codex logs, classify progress and blockers, and produce concise manager summaries.

    107 GitHub stars~967 tokensUpdated yesterday
    Auto-check passed
  • Codebase Memory MCP

    vincentkoc/dotskills

    Resolve canonical Git checkouts, index and verify codebase-memory-mcp graphs through the guarded CLI, and safely audit duplicate worktree caches.

    107 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Org Branch Cleanup

    vincentkoc/dotskills

    Audit and safely prune stale branches across a GitHub organization with immutable snapshots, conservative merged-PR classification, live SHA/protection/open-PR revalidation, resumable deletion…

    107 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Session Done

    vincentkoc/dotskills

    Prepare a concise session handoff when the user asks to wrap up, capture continuation context, or use /done.

    107 GitHub stars~833 tokensUpdated yesterday
    Auto-check passed
  • Codex Goal Mining

    vincentkoc/dotskills

    Mine structured Codex /goal history locally or across a configured machine fleet, measure active goal time and resumed thread spans, identify unfinished and recurring semantic runs, and turn them…

    107 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Codex Session Recovery

What does Codex Session Recovery do?

Recover Codex or Claude sessions from tmux panes, saved cockpit snapshots, session history, and recent agent logs without overwriting useful restore evidence. Codex Session Recovery is an agent skill from vincentkoc/dotskills. Recover Codex or Claude sessions from tmux panes, saved cockpit snapshots, session history, and recent agent logs without overwriting useful restore evidence.

When should I use Codex Session Recovery?

Codex Session Recovery fits situations like: loses visible context; needs a resume command; requires a safe targeted restore plan.

How do I install Codex Session Recovery in Claude Code?

Run `npx skills add vincentkoc/dotskills --skill codex-session-recovery -a claude-code`. Or copy the skill folder (skills/codex-session-recovery in vincentkoc/dotskills) into .claude/skills/codex-session-recovery in your project. Claude Code loads it when a task matches its description.

How do I install Codex Session Recovery in Codex?

Run `npx skills add vincentkoc/dotskills --skill codex-session-recovery -a codex`. Or copy the skill folder (skills/codex-session-recovery in vincentkoc/dotskills) into .agents/skills/codex-session-recovery in your project. Codex loads it when a task matches its description.

Can I use Codex Session Recovery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vincentkoc/dotskills --skill codex-session-recovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex-session-recovery, .gemini/skills/codex-session-recovery, .github/skills/codex-session-recovery and .opencode/skills/codex-session-recovery in your project.

What does Codex Session Recovery need to run?

Going by SKILL.md and its folder, Codex Session Recovery needs the command-line tools its instructions call (codex).

Does Codex Session Recovery access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codex Session Recovery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codex Session Recovery use?

Codex Session Recovery is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex Session Recovery use?

About 808 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codex Session Recovery?

Skills that share tags, products or a category with Codex Session Recovery: 1password (trpc-group/trpc-agent-go, 1.9k stars), CodeGraph Agent Eval (colbymchenry/codegraph, 74k stars), Tmux (trpc-group/trpc-agent-go, 1.9k stars) and CodexBar Live QA (steipete/CodexBar, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex Session Recovery?

vincentkoc (a GitHub user) maintains it in vincentkoc/dotskills, which has 107 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: vincentkoc/dotskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.