codex-session-recovery

codex-session-recovery is a skill for Codex from vincentkoc/dotskills. It costs 61 tokens per session (1,092 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: reads ~/.codex paths; mentions AGENTS.md; 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-session-recovery

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 1,092 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.01092
Opus 5.5 $0.00024 $0.00437
Sonnet 5.5 $0.00012 $0.00218
Haiku 4.5 $0.00006 $0.00109

Measured 26d ago against content hash 29fdf4bb36cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 26d 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 · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 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.
    • Preserve Codex and Claude history; never delete or overwrite it during recovery or cleanup.
    • 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.
    • For tt cockpit restoration, read tt recovery and the snapshot directory's AGENTS.md before choosing a restore route. Install missing guidance from its dotfiles source; do not run a full bootstrap for this.
    • 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.
    • Inventory pane markers separately from terminal RGB support. A working palette does not prove the saved amber, green or other pane assignments survived. Match historical colors by exact session UUID and CWD when window numbers changed.
  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.
    • If the exact owners are already live, attach or repair only missing markers. Preview tt marker restore <session> <snapshot> when supported; preserve current conflicting markers. Do not rebuild or restart agents for missing pane colors.
  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.
    • For cockpit recovery, prepare the native RGB palette, saved pane markers and native agent launch environment before starting any Codex process. Restore the native three-column, two-row six-pane layout and verify rendered colors, not only live PIDs.
    • Preserve the original goals feature setting and each thread's goal lifecycle, objective, budget and usage. Do not add --disable goals, pause/clear goals, or issue blanket resume commands as part of restoration. Preserve native continuation of active goals; leave paused and terminal goals in their existing states.
  6. Stay narrow for session-ID requests.
    • Return the concrete ID and codex resume <id> first.
    • Add the broader recovery method only when requested.

Read the full file on GitHub · 89 lines

Files

What ships with it

3 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. 26d ago Changed 29fdf4bb36cc
  2. 1mo ago Changed · +10 lines 64ce20b17fae
  3. 2mo ago Changed · +19 lines 3b90810c31a2
  4. 3mo 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 (111 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 1,092 once invoked, about $0.0002 per session on Opus 5.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

codex-session-recovery compared with skills from other repositories

codex-session-recovery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-session-recoveryvincentkoc/dotskillsSkill111todayMITA61Codex
research-reportShenSeanChen/waku-agentSkill2.3ktodayMITA0Claude Code, Codex
systematic-debuggingmoltis-org/moltisSkill3.0k1mo agoMITA33Claude Code, Codex
da-anomaly-analysisShenSeanChen/waku-agentSkill2.3ktodayMITA0Claude Code, Codex
ideationmoltis-org/moltisSkill3.0k1mo agoMITA75Claude Code, Codex
meeting-prepShenSeanChen/waku-agentSkill2.3ktodayMITA0Claude Code, Codex
slacrawlmoltis-org/moltisSkill3.0k1mo agoMITA41Claude Code, Codex