From sadlay-skills
Restore Codex historical session visibility after switching model_provider or provider/account. Use when Codex Desktop, Codex CLI /resume, or project recent sessions stop showing old conversations after a provider switch; when the user asks to resync Codex history, recover missing sessions, inspect provider/session metadata, install or run codex-provider-sync, switch provider and sync metadata, or restore a provider-sync backup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sadlay-skills:codex-provider-syncThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the installed `codex-provider` CLI from `codex-provider-sync` to repair Codex session visibility metadata. The tool updates rollout metadata, SQLite thread metadata, and project workspace cache data; do not manually edit only one of those stores unless the tool is unavailable and the user explicitly asks for manual repair.
Use the installed codex-provider CLI from codex-provider-sync to repair Codex session visibility metadata. The tool updates rollout metadata, SQLite thread metadata, and project workspace cache data; do not manually edit only one of those stores unless the tool is unavailable and the user explicitly asks for manual repair.
Read references/behavior.md when you need command semantics, output interpretation, risk boundaries, or troubleshooting details.
${CODEX_HOME} when set, otherwise ~/.codex. Pass --codex-home PATH only when the user gives a non-default home.codex-provider CLI is available:
command -v codex-provider on macOS/Linux or where codex-provider on Windows.references/behavior.md#new-environment-installation before continuing.codex-provider status to verify it starts.codex-provider status first unless the user explicitly gave a backup restore path or a specific command to run.Current provider, rollout provider counts, SQLite provider counts, project visibility diagnostics, locked rollout file count, encrypted content warnings, and backup root.codex-provider sync when the user already switched provider/auth elsewhere and wants old sessions visible under the current provider.codex-provider sync --provider <id> when the target provider is clear but config.toml should not be changed.codex-provider switch <id> when the user wants the root model_provider changed and session metadata synced in one operation.codex-provider restore <backup-dir> when the user wants to roll back a previous sync or synced to the wrong provider.codex-provider prune-backups --keep <n> only for managed backup cleanup.codex-provider status
codex-provider sync
codex-provider sync --provider openai
codex-provider switch apigather
codex-provider restore ~/.codex/backups_state/provider-sync/<timestamp>
codex-provider prune-backups --keep 5
With an explicit Codex home:
codex-provider status --codex-home /path/to/.codex
codex-provider sync --codex-home /path/to/.codex
codex-provider switch openai --codex-home /path/to/.codex
When the CLI is missing and Node.js 24+ is available:
npm install -g git+https://github.com/Dailin521/codex-provider-sync.git
codex-provider status
status as read-only.sync and switch to create backups under ~/.codex/backups_state/provider-sync/<timestamp>.auth.json, login state, message content, titles, or updated_at.encrypted_content from another provider/account may become visible but can still fail on continue or compact with invalid_encrypted_content.codex-provider command; otherwise install it with user approval or run it from a located local project.state_5.sqlite is currently in use, tell the user to close Codex, Codex Desktop/App, and app-server, then rerun the same command.codex-provider sync after the active session ends.switch <provider-id> says the provider is unavailable, tell the user to define it in config.toml or switch auth/provider with their existing provider tool first, then run codex-provider sync.state_5.sqlite is malformed or unreadable, stop. Tell the user the tool refused to sync and that the database must be backed up, repaired, or restored before retrying.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub sadlay/agent-skills --plugin sadlay-skills