Codex Session Recovery logo

Codex Session Recovery

Community
vincentkoc
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. Use when a pane crashes, detaches, loses visible context, needs a resume command, or requires a safe targeted restore plan.

Overview

Publishervincentkoc
Repositorydotskills
Skill namecodex-session-recovery
Stars
112
Forks
9
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by vincentkoc on GitHub. Read the source before you install it.

Installation

Install the Codex Session Recovery AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/vincentkoc/dotskills/tree/main/skills/codex-session-recovery
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vincentkoc/dotskills.git /tmp/dotskills
mkdir -p .claude/skills
cp -r /tmp/dotskills/skills/codex-session-recovery .claude/skills/codex-session-recovery
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codex Session Recovery in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codex Session Recovery on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codex Session Recovery is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.
    • 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.

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.
  • Verified marker assignments and active/inactive styles, or an explicit missing-color evidence gap. PID counts alone do not establish a complete cockpit restore.
  • Concise blocker when evidence is insufficient.

Flow

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codex Session Recovery AI skill do?

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.

Why use Codex Session Recovery on TypingMind?

Because you install it once and use it with any model. Codex Session Recovery is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codex Session Recovery in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vincentkoc/dotskills/tree/main/skills/codex-session-recovery. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codex Session Recovery?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codex Session Recovery?

As many as you like. As long as a model supports skills, you can use Codex Session Recovery with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codex Session Recovery AI skill free?

Yes. It is published on GitHub by vincentkoc under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇