Dailin521/codex-provider-sync

Synchronize Codex session provider metadata across rollout files and SQLite state.

What it solves

This tool addresses the issue where old chat sessions in Codex remain linked to a previous AI provider after a user switches providers. This metadata inconsistency prevents old sessions from being usable with the new provider.

How it works

The tool aligns the provider information stored in session files and the SQLite chat index to match the current configuration. It parses the first line of metadata in each session file and updates the provider name. Depending on the length of the provider name, it either overwrites the metadata in place or streams the content to a new file to avoid corrupting the session data.

Who it’s for

Users of Codex who frequently switch between different AI providers or use tools like CCSwitch to change their backend configurations.

Highlights

  • Multi-interface support: Available as a Windows desktop app, a local Web UI, and a CLI for automation and WSL.
  • Automatic Backups: Automatically creates backups before making modifications, with a management system for restoration.
  • Coresync Logic: Uses a shared Node.js core to ensure consistent behavior across all entry points.
  • Non-destructive: Only modifies provider metadata; it does not touch chat content, historical models, or authentication files.

Related

  • Project
  • Project
  • Project
  • Project