codex-runtime-recovery
Use when Codex state is split across Windows, WSL, or VS Code, sessions disappear, state_5.sqlite files churn, or CODEX_HOME and launch routing drift need diagnosis before destructive repair.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- codex-runtime-recovery
- description
- Use when Codex state is split across Windows, WSL, or VS Code, sessions disappear, state_5.sqlite files churn, or CODEX_HOME and launch routing drift need diagnosis before destructive repair.
02 资源文件 4
- 参考文档agents/openai.yaml252 B
- 参考文档references/recovery-lanes.md774 B
- 参考文档references/topology-checks.md867 B
- 脚本scripts/inspect_codex_topology.py2.9 KB
03 SKILL.md 正文
Codex Runtime Recovery
Overview
Recover Codex when runtime ownership drifts across hosts or launch paths. Start read-only, identify the canonical store, and separate data-plane issues from extension-host or auth failures before touching live state.
Reference Map
- Read references/topology-checks.md to verify active
CODEX_HOME, candidate stores, config paths, and lock-sensitive files. - Read references/recovery-lanes.md to choose between lightweight recovery, canonicalization, and reset-only-as-last-resort flows.
- Run scripts/inspect_codex_topology.py before making any mutation. It inventories candidate stores, session counts, and state DB presence without editing them.
Required Discovery
- Identify the active host and launch path: CLI, VS Code, Windows, WSL, or remote.
- Determine the authoritative store to preserve before merging or resetting anything.
- Separate data-plane failures from control-plane failures.
- Inspect
auth.json,config.toml,state_5.sqlite*, and session trees before rotating or deleting them.
Recovery Lanes
Lightweight lane
Use when the session exists and visibility is broken. Prefer targeted JSONL import, codex resume, or a path fix over broad resets.
Canonicalization lane
Use when Windows and WSL or CLI and VS Code have diverged. Converge on one canonical CODEX_HOME, archive mirrors, and update launch settings to stop re-divergence.
Reset lane
Use only after export or backup and only when migration or state DB corruption blocks startup across all launch paths.
Stop Rules
- Do not delete live state DBs before creating a backup.
- Do not merge stores blindly while both sides are still active writers.
- Do not classify token or auth failures as missing-session incidents.
- Stop and collect evidence if the failure reproduces on both Windows and WSL after config alignment.
Output Contract
Return success, partial, or blocked and list:
- active host and
CODEX_HOME - canonical store chosen
- evidence gathered
- exact mutation steps taken or deferred
- residual risks
Common Mistakes
- Treating VS Code extension crashes as data loss.
- Resetting both Windows and WSL stores at once and destroying the only good copy.
- Rotating
state_5.sqlite*without proving the store split or migration mismatch first.
04 同仓库更多 Skills
clarify-requirements
Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.
openmm-md
Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein / protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.
visual-review
Take screenshots of web pages and UI using Playwright for visual review and iteration
status
Diagnostic status report — shows metaswarm installation state, project setup, and potential issues
start
Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work
setup
Interactive project setup — detects your project, configures metaswarm, writes project-local files