codex-session-restore
БесплатноЗапускает вложенные скриптыНе проверенUse when Codex Desktop sidebar sessions disappear, fail with systemError, or cannot continue after a model_provider switch. Diagnoses and repairs active…
от sidiangongyuan★ 28 звёзд на GitHubОб этом скилле
Codex Session Restore
Use the bundled script first. It is dry-run by default and writes nothing unless
--apply is present.
Provider Direction Rule
Set --provider to the provider that Codex Desktop should recognize now, not
automatically to the provider that originally created the sessions.
- If the user switched from krill/custom to official OAuth and wants old active
sessions to appear under the current official login, use
--provider openai. - If the user explicitly wants to switch the environment back to krill and make
sessions belong to krill, use
--provider krill. - Do not edit
config.toml,auth.json, or cc-switch's current provider just to restore sidebar visibility. Changing current auth/provider is a separate user request.
Quick Start
Resolve <skill-dir> to the directory containing this SKILL.md; do not
assume a particular global skills installation root.
Restore old krill sessions into the current official/OAuth sidebar:
python "<skill-dir>/scripts/restore_codex_sessions.py" scan --provider openai
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-active --provider openai
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-active --provider openai --apply --yes
python "<skill-dir>/scripts/restore_codex_sessions.py" verify --provider openai
Repair one thread:
python "<skill-dir>/scripts/restore_codex_sessions.py" scan-thread --thread-id THREAD_ID --provider openai
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-thread --thread-id THREAD_ID --provider openai
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-thread --thread-id THREAD_ID --provider openai --apply
python "<skill-dir>/scripts/restore_codex_sessions.py" verify --thread-id THREAD_ID --provider openai
Use repair-active --provider PROVIDER --apply --yes only after a dry run
confirms the active non-archived session set is correct. Open turns newer than
30 minutes are treated as possibly active and are not closed unless
--close-recent-open-turns is explicitly present. Archived sessions stay
untouched unless --include-archived is explicitly present.
Workflow
- Identify the target thread id or run
scanto find active non-archived threads with provider mismatch, parse errors, open turns, open child spawn edges, or stale goals. - Decide the target provider from the user's current login/config goal:
current official OAuth means
openai; current krill meanskrill. - Run
scan-thread --thread-id IDbefore single-thread repair. Readreferences/recovery-checklist.mdwhen the report shows multiple issue types or Codex Desktop still showssystemError. - Run
repair-thread --thread-id ID --provider PROVIDERorrepair-active --provider PROVIDERwithout--applyto preview actions. - Run the same command with
--applyonly after the preview is acceptable. - Run
verify --provider PROVIDERorverify --thread-id ID --provider PROVIDER. - If available, search the live Codex thread list for a known old title to confirm local sessions reappeared. Otherwise fully restart Codex Desktop so the app server reloads thread state from disk.
Common Provider Switch Recipes
When the user says, "I am logged in with official Codex now, but my krill
sessions disappeared," keep official OAuth as-is and migrate active session
metadata to openai:
python "<skill-dir>/scripts/restore_codex_sessions.py" scan --provider openai
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-active --provider openai
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-active --provider openai --apply --yes
python "<skill-dir>/scripts/restore_codex_sessions.py" verify --provider openai
When the user explicitly wants to use krill as the current provider, repair
active session metadata to krill:
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-active --provider krill
python "<skill-dir>/scripts/restore_codex_sessions.py" repair-active --provider krill --apply --yes
python "<skill-dir>/scripts/restore_codex_sessions.py" verify --provider krill
Safety Rules
- Do not touch
archived_sessionsor archived rows unless the user explicitly asks and the command includes--include-archived. - Do not switch provider configuration or copy third-party auth settings unless the user explicitly asks to change providers. Session restore normally repairs metadata to match the provider already in use.
- Do not edit live files manually when the script can perform the same repair.
- Do not use
task_completeto close an interrupted or damaged turn. Useturn_aborted. - Do not delete non-empty historical turns. The script isolates open turns by
inserting or appending
turn_aborted. - Do not close recent open turns unless the user explicitly confirms they are
stale. Use
--close-recent-open-turnsonly for known failed continuations. - Back up before every
Установить codex-session-restore в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл codex-session-restore?
Use when Codex Desktop sidebar sessions disappear, fail with systemError, or cannot continue after a model_provider switch. Diagnoses and repairs active, non-archived sessions without changing authentication or provider configuration.
Как установить скилл codex-session-restore?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл codex-session-restore запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic