lov-fix-codex-session
БесплатноЗапускает вложенные скриптыНе проверен诊断并修复无法恢复的 Codex 会话:定位悬挂 tool call/output,并在切换模型 提供商后处理 Model provider not found 的 provider 绑定,恢复交付物与可继续路径。
от lovstudio★ 72 звезды на GitHubОб этом скилле
会话救援 · Session Rescuer
把一条无法继续的 Codex 线程诊断清楚,并给出能继续的产物。它覆盖两种常见
故障:tool call 没有配对的 tool output,以及切换 provider / 中转站后
Model provider not found。前者可以从磁盘交付物接手或生成可恢复 rollout
副本;后者只同步 state_*.sqlite 的 provider 绑定,不改写 rollout。
Triggers
Activate when
- “修复 codex://threads/… 里报错:No tool output found for tool call …”
- “修复 codex://threads/… 里报错:Model provider
customnot found” - “切换中转站 / CC Switch 后旧 Codex 线程打不开,需要把 model_provider 统一为当前 provider”
- “这条 Codex 会话继续不了了 / 会话卡死在 systemError / 会话恢复不了”
- “帮我诊断这个 Codex 线程为什么无法继续,怎么救回里面的产物”
- “Fix this stuck Codex session showing 'No tool output found for tool call …'”
- “Sync all Codex thread model_provider values to the current provider name”
- “Diagnose and recover a Codex thread that can no longer be resumed.”
Do not activate when
- 只是要打开、导航到某个 Codex 会话 —— 交给
lov-open-codex-session。 - 只是要检索过去聊过什么 / 上次怎么解决的 —— 交给
lov-search-chat。 - 只修改
config.toml、不处理 thread 元数据 —— 交给 provider manager / CC Switch; 本 Skill 处理的是 thread 与配置已经不一致后的恢复。 - 面向任意软件错误的通用定位与修复 —— 交给
lov-fix-general;本 Skill 只处理 Codex 会话持久化状态与 provider 绑定的特定故障。 - 要把修复后的源发布 / 上架 / 上传 —— 交给
lov-skill-publisher。
User Profile (cross-session)
skill.yaml 声明 user-profile/v1。每次运行开始先读共享的 user、brand、
workspace、preferences 与 skills.lov-fix-codex-session 命名空间。线程 id、
rollout 路径、转录内容、秘密或完整私有路径都不写入持久 Profile;涉及会话的
标识只在当前请求内使用。字段解析优先级:当前请求 → 项目上下文 → Skill 记录
→ 共享偏好 → 共享 user/brand Profile → 安全默认值。
When the user directly states a durable preference or brand fact, persist it
through scripts/profile_store.py and report the saved profile path. Put
Skill-specific values under records.<field>; use brand.<field> or
user.<field> for shared values. Do not persist inferred secrets or credentials.
See references/user-profile.md for the complete contract.
Skill Group Composition
Read references/skill-composition.md before deciding whether to invoke or
extend any adjacent capability. The record distinguishes optional upstream and
downstream handoffs from embedded Kit modules. Do not silently depend on a
sibling Skill that is not shipped with this source.
Workflow (MANDATORY)
You MUST follow these steps in order.
Step 0: Resolve skill root, dependencies, and runtime context
- Use
SKILL_DIRif the environment provides it. - Otherwise infer the installed skill directory from the current skill context.
- Verify every required local module, reference, script, and asset before work.
- If a required resource is missing, name its expected relative path and stop before producing a partial result.
When running scripts manually:
export SKILL_DIR="/path/to/lov-fix-codex-session"
context.profile 按上述优先级解析。用户直接说出的、希望跨会话保留的值,用
scripts/profile_store.py record --confirm 原子写回并报告保存路径;推断值、
秘密、token、cookie 与 key 不入库。
Step 1: Understand the requested outcome
- Separate internal context from user-visible output.
- Confirm the input, intended audience, expected deliverable, and evidence gaps.
- Record one real user case before calling the Skill complete. The case must show the input, the prompt or minimum brief, and the output; do not invent results.
- 先判断故障类型:报错含
Model provider ... not found时,输入是当前config.toml/state_*.sqlite;报错含No tool output found时,输入是 线程 id / codex:// 链接。输出始终是一份诊断结论 + 可继续的恢复路径; 不要把实现细节作为用户制品。
Step 1.5: Analyze nearby Skills before implementation
- Inspect related local and installed Skills by routing contract and concrete input/output, not by filename alone.
- Record upstream, core, downstream, overlap, and not-composed decisions in
references/skill-composition.md. - Keep sibling Skills optional and artifact-based. When stages require hard coupling for one outcome, create a self-contained Kit instead.
- 本 Skill 是 Codex 会话恢复这一窄领域的核心原子,与通用修复、会话导航、
会话检索是相邻不重叠关系;见
references/skill-composition.md。
Step 2: Execute the workflow
- 故障分诊:错误是
Model provider ... not found时走A;否则按B处理悬挂 tool call。 - A. 同步 provider 绑定(只读预演):
确认python3 "$SKILL_DIR/scripts/sync_thread_provider.py" --codex-home "$HOME/.codex" --jsoncandidate_ids只包含真正过期的 provider(默认stale-only,不会 动 built-in 的openai)。然后退出 Codex Desktop,运行:
脚本会先做 SQLite 一致备份再写python3 "$SKILL_DIR/scripts/sync_thread_provider.py" --codex-home "$HOME/.codex" --applythreads.model_provider。不要重写sessions/下的 JSONL:paginated 会话的end_byte_offset会因此失效。 - B. 解析标识:若错误是悬挂 tool call,从
codex://threads/<uuid>、 线程 id 提取thread_id;若给的是链接,只取 UUID。 - B. 定位 rollout:优先读
state_5.sqlite的threads.rollout_path;拿不到 就在~/.codex/sessions下按线程 id 搜索rollout-*.jsonl。 - B. 只读诊断:
核对报告中的python3 "$SKILL_DIR/scripts/fix_codex_session.py" "$thread_id" --jsondangling_calls与last_turn_error;poisoned=true即为毒点。 - 恢复交付物:找出该线程在项目目录里已生成的 Markdown、PDF、图片、代码。 这些是真正值得抢救的产物,先把它们确认下来并回读。
- 给出恢复路径(tool-call 场景二选一,优先第一条):
- 在已保存交付物的
Установить lov-fix-codex-session в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lov-fix-codex-session?
诊断并修复无法恢复的 Codex 会话:定位悬挂 tool call/output,并在切换模型 提供商后处理 Model provider not found 的 provider 绑定,恢复交付物与可继续路径。
Как установить скилл lov-fix-codex-session?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lov-fix-codex-session запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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