codex-session-recovery

codex-session-recovery is a skill for Codex from vincentkoc/dotskills. It costs 61 tokens per session (576 once invoked), scanned A, original, MIT.

A recovery workflow for Codex, Claude, or tmux sessions. Tmux is a terminal tool that keeps programs running in panes and windows, even when the visible connection is lost.

In plain words
What is it for?
Use it to inspect panes and logs, find a Codex resume command, preview or restore saved state, and repair missing snapshot history or tmux bindings.
Why use it?
It helps find the right saved session or pane state after a crash, detachment, or lost context without overwriting useful recovery evidence.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to inspect panes and logs, find a Codex resume command, preview or restore saved state, and repair missing snapshot history or tmux bindings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vincentkoc/dotskills/codex-session-recovery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vincentkoc/dotskills --skill codex-session-recovery
Clone the repo
git clone --depth 1 https://github.com/vincentkoc/dotskills

Made for: Codex.

Its marketplace also offers this one on its own, as the plugin codex-session-recovery/plugin install codex-session-recovery after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-session-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/vincentkoc/dotskills/codex-session-recovery.svg)](https://agentmods.dev/skills/vincentkoc/dotskills/codex-session-recovery)
Your own site
<a href="https://agentmods.dev/skills/vincentkoc/dotskills/codex-session-recovery"><img src="https://agentmods.dev/badge/skills/vincentkoc/dotskills/codex-session-recovery.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 576 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 25
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.00576
Opus 5 $0.00030 $0.00288
Sonnet 5 $0.00012 $0.00115
Haiku 4.5 $0.00006 $0.00058

Measured 8d ago against content hash a13b9878d1a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codex-session-recovery scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codex-session-recovery/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 60 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 60 lines · 61 tokens per session scan A a13b9878d1a4

Subscribe to this mod's changes

codex-session-recovery is a skill published in the GitHub repository vincentkoc/dotskills (102 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 576 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

taiyi-plan

A TaiyiForge planning step that turns a README, product requirements document, or technical plan into a list of separate project changes. Each change includes a suggested work profile, dependencies, and priority.

Dong90/oh-my-taiyiforge · 52 tokens

taiyi-change

A TaiyiForge workflow stage for writing a change proposal in CHANGE.md, with checks for scope, risks, success criteria, and related project documents.

Dong90/oh-my-taiyiforge · 25 tokens

taiyi-integration

A project workflow skill for closing a TaiyiForge change and recording it in a CHANGELOG.md file. It checks review results, tests, and the state of the working tree before archiving the change.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-requirement

A requirements-analysis process that turns a proposed change into a REQUIREMENT.md document. It records user needs, acceptance checks, terminology, triggers, and dependencies, with different levels of detail for different project sizes.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-test

A project workflow skill for verifying an implementation and producing a TEST.md record. TDD means writing a failing test, implementing the change, and then making the test pass; this skill checks that process and other regression cases.

Dong90/oh-my-taiyiforge · 24 tokens

security-compliance

Guides security professionals in implementing defense-in-depth security architectures, achieving compliance with industry frameworks (SOC2, ISO27001, GDPR, HIPAA), conducting threat modeling and risk assessments, managing security operations and incident response, and embedding security throughout the SDLC.

sangrokjung/claude-forge · 56 tokens