← 返回 Skills 市场
lttcnly

Codex History Visibility Repair

作者 lttcn · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
37
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install codex-history-visibility-repair
功能描述
Use when Codex Desktop history, migrated sessions, restored rollout JSONL files, or old projects exist on disk but do not appear in the sidebar, especially a...
使用说明 (SKILL.md)

Codex History Visibility Repair

Overview

Use the bundled Python script to repair Codex Desktop's local history indexes after migrations. The common root cause is not missing JSONL files: thread/list filters by exact model_provider, source metadata, state database rows, and project assignments.

Quick Start

Run a dry run first:

python "$env:USERPROFILE\.codex\skills\codex-history-visibility-repair\scripts\repair_codex_history_visibility.py" --dry-run --scan-project-parent D:\object

Apply the repair and verify via app-server thread/list:

python "$env:USERPROFILE\.codex\skills\codex-history-visibility-repair\scripts\repair_codex_history_visibility.py" --scan-project-parent D:\object --verify-app-server

If restored sessions are still archived, include them explicitly:

python "$env:USERPROFILE\.codex\skills\codex-history-visibility-repair\scripts\repair_codex_history_visibility.py" --target all --unarchive --scan-project-parent D:\object --verify-app-server

Workflow

  1. Confirm the symptom with local counts: session files exist but thread/list or the sidebar returns too few rows.
  2. Run --dry-run; check selectedThreads, visibleThreads, providerDistribution, and projectMappings.
  3. Run without --dry-run; the script creates ~/.codex/history_sync_backups/visibility-repair.*.
  4. Prefer --verify-app-server; success means both threadListStateDbOnly.returned and threadListScanMode.returned match visible thread count.
  5. Fully exit Codex Desktop, wait 5-10 seconds, reopen it.

What The Script Repairs

File or store Repair
state_5.sqlite normalizes \\?\ prefixes, sets source, thread_source, exact model_provider, and millisecond timestamps
rollout JSONL syncs first session_meta.payload so scans do not restore stale metadata
session_index.jsonl rebuilds visible thread index
history.jsonl rebuilds prompt history entries used by desktop history surfaces
.codex-global-state.json rewrites project roots, root hints, and complete project assignments

Default provider is OpenAI because recent Codex Desktop builds filter by that exact value. Override with --provider only after verifying the active build expects another string.

Common Mistakes

  • Do not only copy files into sessions/; the sidebar also depends on SQLite and global state.
  • Do not use lowercase openai unless thread/list proves the current app expects it.
  • Do not patch only state_5.sqlite; app-server scans rollout JSONL and can reintroduce stale provider/source metadata.
  • Do not leave old after-exit scripts running; they can overwrite the repaired global state.
  • Do not publish personal backups, databases, logs, or auth files with this skill.

Publishing Hygiene

Before sharing or publishing the skill, include only:

  • SKILL.md
  • agents/openai.yaml
  • scripts/repair_codex_history_visibility.py

Never include .codex backups, SQLite databases, history.jsonl, session_index.jsonl, logs, auth files, or user-specific rollout contents.

安全使用建议
Install only if you are comfortable letting this skill modify your local Codex Desktop history database, JSONL session metadata, and global state files. Run the dry run first, review the backup path, avoid --verify-app-server unless you accept launching Codex app-server with analytics enabled, and be aware that the default repair may temporarily make the global state file read-only and start a delayed PowerShell unlock process.
能力评估
Purpose & Capability
The main repair behavior matches the stated purpose: it updates local Codex history indexes, SQLite thread metadata, rollout metadata, and project assignments, while creating backups.
Instruction Scope
The documentation recommends app-server verification but does not clearly disclose that the script launches Codex with an analytics-enabled flag, and the module-level local-only framing is broader than the actual behavior.
Install Mechanism
The package contains a markdown skill file, one small agent metadata file, and one Python script; there are no declared third-party dependencies or installer hooks.
Credentials
The script has write authority over CODEX_HOME history, global state, rollout JSONL files, and state_5.sqlite, and can scan user-specified project parent directories; this is purpose-related but high impact for a user's Codex profile.
Persistence & Privilege
By default, the script can make .codex-global-state.json read-only for 15 minutes and spawn a PowerShell unlock process, which is a temporary persistence mechanism that is not prominently explained in the skill instructions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install codex-history-visibility-repair
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /codex-history-visibility-repair 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: repair hidden Codex Desktop migrated history visibility.
元数据
Slug codex-history-visibility-repair
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Codex History Visibility Repair 是什么?

Use when Codex Desktop history, migrated sessions, restored rollout JSONL files, or old projects exist on disk but do not appear in the sidebar, especially a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 37 次。

如何安装 Codex History Visibility Repair?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install codex-history-visibility-repair」即可一键安装,无需额外配置。

Codex History Visibility Repair 是免费的吗?

是的,Codex History Visibility Repair 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Codex History Visibility Repair 支持哪些平台?

Codex History Visibility Repair 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Codex History Visibility Repair?

由 lttcn(@lttcnly)开发并维护,当前版本 v0.1.0。

💬 留言讨论