codex-session-restore

Repair Codex Desktop sidebar session metadata after provider switches.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sidiangongyuan/codex-skills-vault --skill codex-session-restore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-session-restore
Source: https://github.com/sidiangongyuan/codex-skills-vault/tree/main/skills/codex-session-restore
Command: npx skills add https://github.com/sidiangongyuan/codex-skills-vault --skill codex-session-restore

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sqlite3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the issue of lost or corrupted Codex sessions due to provider switches and restores active sessions to the current logged-in provider.

Core Features & Use Cases

  • Session Recovery: Safely diagnose and repair missing or erroneous Codex Desktop sidebar sessions.
  • Provider Switching: Migrate active sessions from one provider to another without changing auth/config.
  • Use Case: When you switch from one Codex provider to another, this Skill helps to restore your active sessions without losing any information.

Quick Start

Restore your Codex sessions after switching providers with the command: python scripts/restore_codex_sessions.py repair-active --apply --yes

Frequently Asked Questions about codex-session-restore

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restore lost Codex sessions after switching providers?

To restore missing Codex Desktop sidebar sessions after switching providers, this Skill repairs session and thread metadata to migrate active sessions to the current logged-in provider.

Why does my Codex Desktop sidebar lose active sessions when I change providers?

Your Codex Desktop sidebar loses active sessions because provider switches cause session metadata corruption; repairing the session and thread metadata directly restores your active workflows to the new provider.

What do I need to repair Codex session metadata?

To repair Codex session metadata, you need access to Codex state and goal databases via sqlite3, allowing the recovery script to identify and fix missing or erroneous session and thread entries.

Can I migrate active Codex workflows to a new provider without changing auth config?

Yes, you can migrate active Codex workflows to a new provider without changing auth or config by running a script that directly repairs and reassigns the session metadata to the current logged-in provider.

What is the command to repair active Codex sessions?

The command to repair active Codex sessions is `python scripts/restore_codex_sessions.py repair-active --apply --yes`, which executes the metadata recovery process directly on your databases.

Are there limitations to restoring Codex sessions via metadata repair?

A limitation of restoring Codex sessions via metadata repair is that it requires direct access to Codex state and goal databases, meaning it cannot fix sessions lost due to complete database deletion.