← ClaudeAtlas

codex-cross-provider-session-repairlisted

Repair Codex Desktop sessions that fail after switching model providers or importing/forking old conversations. Use this skill whenever a user mentions an old Codex session becoming invalid, “model provider not found”, “Codex cannot load config.toml”, remote context compaction 404s, “Item with id rs_... not found”, repeated reconnecting during resume, or a migrated Codex conversation that cannot continue—even when the user only asks to inspect or explain the failure. Diagnose the target session across its JSONL rollout, root state_5.sqlite, config.toml, and logs_2.sqlite, then make a target-scoped backup-first repair with verification and restart instructions.
WardLu/skills · ★ 1 · AI & Automation · score 70
Install: claude install-skill WardLu/skills
# Codex cross-provider session repair Compatibility: Requires Python 3.9+ with the standard library; Windows, macOS, and Linux Codex homes are supported. Stop Codex Desktop before applying file or database changes. On macOS, the recommended launcher requires Terminal automation permission so it can close only its uniquely titled repair window. Use this skill for a damaged or incompatible *saved Codex session*, not for ordinary model/API troubleshooting. The goal is to make one existing conversation resumable while keeping its user-visible history and avoiding broad cache deletion. ## User interaction flow (end-to-end) The user does not need to memorise CLI flags. A typical session looks like this: 1. **User opens a *new* Codex conversation** (the broken one cannot be used) and provides the session UUID and visible error. 2. **Agent runs the dry-run diagnostic** (see Workflow below). The report shows which failure mode applies and what will be changed. 3. **Agent explains the root cause and gets approval for the write.** After approval, start `scripts/start_repair.py` immediately. On macOS it opens a readable Terminal tab/window and runs the independent worker through a short temporary runner; do not paste the full worker command into the user's shell. The worker is safe whether Codex is still open, is being closed, or was already closed after the approval. Immediately tell the user in the current conversation: `修复任务已启动,最多等待 300 秒;请完全退出 Codex。终端会持续显示进度,完成前不要重新打开。 / Repair