Find the conversations scattered across your AI coding tools.
Codex Mate is a locally running CLI + Web tool for browsing, filtering, and exporting existing sessions in one place, with Provider, Skills, and task management when you need them.
[Documentation] [Quick Start] [简体中文] [Tiếng Việt]
Tip
Local First: Read existing sessions and manage configuration on your machine. No telemetry or Codex Mate cloud account required. Model requests still go to your configured provider; running locally does not mean models run offline.
Was last week's solution discussed in Codex or Claude Code? Narrow down your local sessions by source, project, or time, open the conversation, and export it as Markdown for reference.
Codex Mate manages existing tools and local records. It is not a new AI model or a replacement for your coding assistant. Start by finding one useful conversation, without configuring every tool first.
Get started · Session guide (Chinese) · Thread handoff
Choose by primary use case rather than treating this as an exclusive feature checklist. These projects overlap and can be used together.
| Tool | Primary focus | Best fit |
|---|---|---|
| Codex Mate | Local-first, cross-tool session and configuration management through CLI + Web and desktop entry points | Find, filter, and export conversations from different tools in one place, alongside Provider, Skills, and task workflow management |
| CC Switch | Desktop configuration manager for multiple AI coding tools, covering providers, MCP, Skills, and prompts | Switching API providers and reducing manual edits to each tool's configuration files |
| CloudCLI (Claude Code UI) | Desktop and mobile Web UI for Claude Code, Cursor CLI, and Codex | Using coding assistants from a browser or phone and accessing local or remote projects and sessions |
| ccusage | CLI for analyzing token usage and costs from local coding-agent records | Daily, weekly, monthly, or per-session usage and cost reports |
Why choose Codex Mate? Bring cross-tool conversation lookup, Markdown archiving, and everyday configuration, Skills, and task management into one entry point without replacing your coding assistant.
This comparison follows the official project descriptions linked above; it does not imply that other tools lack unlisted features and is not a performance or pricing ranking. Codex Mate's session operations vary by source; see the session guide (Chinese). Export and handoff do not provide lossless migration of complete session state, and running locally does not mean models run offline.
For CLI + Web, install via Homebrew, npm, or curl below, then run codexmate run. Open the address printed in your terminal, select a source with existing records in the session browser, open a conversation, and use its export action. If there are no local records, create a conversation in the original tool first.
Exports are for reading and archiving, not restoring complete agent state in another tool. Use codexmate setup when you need to configure a provider. See the quick-start guide (Chinese) for details.
Open the latest release. Windows .exe, macOS .dmg, and Linux .AppImage packages appear in Assets only after the desktop builds complete. Download the package for your platform, install it, and launch the desktop app directly; codexmate run is not required.
brew tap SakuraByteCore/codexmate
brew install codexmateRequires Node.js (brew install node if not present).
npm install -g codexmate
codexmate runIf the default Web UI port 3737 is unavailable, Codex Mate automatically tries the next ports (3738, 3739, ...). To force a fixed port, set CODEXMATE_PORT:
CODEXMATE_PORT=8080 codexmate runWindows PowerShell:
$env:CODEXMATE_PORT=8080; codexmate runcurl -fsSL https://raw.githubusercontent.com/SakuraByteCore/codexmate/main/scripts/install.sh | bash- Codex:
npm install -g @openai/codex - Claude Code:
npm install -g @anthropic-ai/claude-code - Gemini CLI:
npm install -g @google/gemini-cli - CodeBuddy:
npm install -g @tencent-ai/codebuddy-code - KiloCode:
npm install -g @kilocode/cli(kilo/kilocode) - OpenCode: install from the official OpenCode docs
- OpenClaw: see the OpenClaw repository
- Pi: sessions are discovered from
~/.pi/agent/sessions; provider config lives in~/.pi/agent/models.jsonand the default provider/model in~/.pi/agent/settings.json - Zed: agent sessions are read from Zed's local database (
threads/threads.dbunder its data directory) and listed in the session browser (read-only)
Share a structured handoff card with a target agent through a shared-memory MCP. This does not restore complete session state. Save a card.json containing a goal string and string arrays for completed, blockers, nextSteps, and files:
{
"goal": "Finish the documentation update",
"completed": ["Reviewed the session guide"],
"blockers": [],
"nextSteps": ["Check the translated examples"],
"files": ["README.md"]
}Run from the source checkout; after installation, replace node cli.js with codexmate:
node cli.js thread handoff <thread-id> --card <json-file> --target <agent>
node cli.js thread list <thread-id>
node cli.js thread fallback <thread-id> --handoff <id>
node cli.js thread ack <thread-id> --handoff <id> --agent <target> --evidence <session-or-retrieval-id>Use the handoff's returned ID for <id>, the same target agent for <target>, and an actual session or retrieval ID for the evidence. Run ack only after the target reports reading the card.
- File first, bounded MCP routing: Save handoff files under
~/.codexmate/threads/<hash>/first. Discover shared-memory MCPs by reading the project's.mcp.json, Claude user configuration, and Codexconfig.tomlwithout modifying them. Select one MCP with a compatible native write tool and use a short-lived connection, not a daemon. Compatibility with arbitrary MCP versions is not guaranteed. No new dependencies or forced prompt insertion are added. - Explicit file fallback: A failed MCP write does not retry automatically; the result reports the file path.
thread fallbackreturns the file text. The session handoff area's copy-card button in the UI is also an explicit file fallback: paste the copied card into the target yourself; copying does not send it automatically. - Write success is not a read receipt: A successful MCP write only sets
awaiting_read, not proof that the target read the card.thread ackrecords the target's self-reported read with evidence, not an independently verified receipt. - Audit:
thread list <thread-id>returns the audit, including the selected MCP/tool, elapsed time, write result, fallback, and read status.
After finding your conversations, manage the configuration, skills, and tasks used in your daily work:
- Unified Session Browser: Browse local sessions from Codex, Claude Code, Gemini CLI, CodeBuddy Code, WorkBuddy, Pi, OpenCode, and Zed in one place. Search, export, and deletion availability varies by source; see the session guide (Chinese). Session details show an always-visible five-category token breakdown, a composition bar, and a health rating.
- OpenAI-Compatible Bridge: Use Codex with any OpenAI-compatible UI by normalizing the Responses API; the built-in Codex conversion also fills and normalizes Codex fingerprint headers such as
User-Agent,Version,OpenAI-Beta, andOriginatorso upstream providers see an official Codex CLI-shaped request. - Claude Provider Bridge: Connect Claude Code to OpenAI Chat Completions-compatible providers and Ollama through the built-in local Claude-compatible proxy.
- OpenCode Provider Control: Manage OpenCode provider/model selection with a CodexMate-owned provider store under
~/.codexmate, projecting only the active provider into native OpenCode config to avoid polluting or deleting user-owned settings. - KiloCode Config Bridge: Configure KiloCode providers from the CLI or Web UI, writing to
~/.config/kilo/kilo.jsoncwhile preserving stored API keys. - Pi Provider Config: Manage Pi providers from the Web UI with lossless round-trip writes to
~/.pi/agent/models.json, auto-fetched remote model lists, and one-click default provider/model switching via~/.pi/agent/settings.json. - Provider Health Cleanup: Probe local Codex and Claude provider routes, surface failed configs in one modal, and bulk-clean selected broken providers without touching healthy or protected entries.
- Skills Marketplace: A local-first market to share and import skills between different agent apps.
- Prompt File Editor: Unified editor for global and project-level
CLAUDE.mdandAGENTS.md(including OpenCode's~/.config/opencode/AGENTS.md) with auto-detection of project paths, plus a shared preset pool for reusable prompts. - Task Orchestrator: Automatically advance existing workflows, persist progress and results, and request intervention only when blocked.
| Feature | Status | Description |
|---|---|---|
| Provider Management | ✅ | Switch providers/models for Codex, Claude, OpenCode, KiloCode, OpenClaw, and Pi |
| Live Agent Sync | ✅ | Real-time monitoring of Codex/Claude config & status |
| Session Browser | ✅ | Browse and filter local sessions; search and Markdown export depend on the source. See the session guide |
| Usage Analytics | ✅ | Visualize message trends and top projects |
| Local Skills Market | ✅ | Cross-app import/export of agent skills |
| Task Queue | ✅ | Dependency-aware automatic workflows, persistent progress, safe recovery, and result summaries |
| OpenAI Bridge | ✅ | Convert Codex Responses API to standard OpenAI format and attach/normalize Codex fingerprints in the built-in conversion |
| Claude Provider Bridge | ✅ | Connect Claude Code to OpenAI Chat Completions-compatible providers and Ollama via the built-in Claude-compatible proxy |
| OpenCode Provider Store | ✅ | Keep multiple OpenCode providers in ~/.codexmate while projecting only the selected provider to native OpenCode config |
| KiloCode Config Bridge | ✅ | Configure KiloCode through codexmate kilo config or the Web UI, writing provider URL/model/API key data to ~/.config/kilo/kilo.jsonc |
| Pi Provider Config | ✅ | Manage Pi providers in the Web UI writing to ~/.pi/agent/models.json (unknown fields preserved) and switch the default provider/model in ~/.pi/agent/settings.json |
| Provider Health Check | ✅ | Probe local Codex/Claude provider routes, highlight failed configs, and bulk-remove selected broken providers safely |
| Prompt Templates | ✅ | Variable-fill dialog on invocation, one-template JSON sharing, and versioned plugin template configuration with history Diff and rollback. git_diff is pasted text, not an executed command. |
| Prompt File Editor | ✅ | Edit global and project-level CLAUDE.md / AGENTS.md with a shared preset pool. Presets fill variables before updating the editor; save manually to write files. History shows version Diff; confirmed rollback writes the selected version with an atomic backup and concurrent-change checks. |
| MCP Integration | ✅ | Expose local tools and resources via MCP stdio |
| Auto Update | ✅ | Quick update CLI via codexmate update |
Reuse existing workflow definitions and let the backend advance tasks automatically after submission. The dashboard's workflow panel supports submission, result lookup, resuming with additional input, and cancellation of subsequent steps. Closing the page does not interrupt execution; tasks do not execute while the service is stopped.
Start the local service in one terminal and keep it running:
codexmate run --no-browserSubmit tasks from another terminal. Use the returned record's id as <runId> in subsequent commands:
codexmate workflow list --json
codexmate workflow submit diagnose-config --json
codexmate workflow active-runs --json
codexmate workflow detail <runId> --json
codexmate workflow resume <runId> --input @input.json --json
codexmate workflow cancel <runId> --jsonresumeonly resumes tasks waiting for intervention. Provide the complete updated input ininput.json; omit--inputto retain the original input.- Write steps require explicit
--allow-writepermission and the corresponding tool configuration's write permission. Check actual side effects before resuming a write step with an uncertain outcome. - The CLI connects to
127.0.0.1:3737by default. For a custom port, set the sameCODEXMATE_PORTin both terminals. When using an access token, use the sameCODEXMATE_HTTP_TOKENfor the service and caller. - The existing synchronous
codexmate workflow runremains compatible.workflow runsreads its execution history;workflow active-runsreads persistent run records.
- Persist definition snapshots, input, node states, full output, and attempt counts. Result summaries include completed items, the final result, and reasons for unfinished work.
- After a service restart, resume confirmed-safe read-only nodes without repeating successful nodes. Write or unclassified nodes with uncertain outcomes wait for intervention instead of replaying automatically.
- Validate explicit dependencies and preserve sequential execution for existing definitions. Natural-language task decomposition is not included.
- Retry only read-only failures explicitly marked as retryable, within a finite budget.
retryaccepts0–5and defaults to no retries. Write operations never retry automatically. - Missing required input or write permission pauses execution for intervention. Cancellation stops subsequent advancement; an active tool must finish before cancellation completes.
- When
timeoutMsexpires, send an abort signal but still wait for the tool to settle. Tools that do not support the signal cannot guarantee a hard timeout; the system does not falsely report termination. - Enable
workflow-completed,workflow-failed, andworkflow-waitingin Webhook settings for completion, failure, or intervention alerts. Notification failures are recorded separately and do not change execution outcomes. Results remain queryable without notifications.
%%{ init: { 'flowchart': { 'curve': 'catmullRom' } } }%%
flowchart TD
User([User])
CLI[CLI]
WebUI[Web UI]
MCP[MCP Server]
subgraph Mate [Codex Mate Core]
API[HTTP API]
Config[Config Engine]
Session[Session Manager]
Skills[Skills Market]
Tasks[Task Runner]
end
subgraph Local [Local Filesystem]
CodexDir[~/.codex]
ClaudeDir[~/.claude]
ClawDir[~/.openclaw]
OpenCodeDir[~/.config/opencode]
MateDir[~/.codexmate]
State[Sessions/Usage/Trash]
end
User --> CLI & WebUI & MCP
CLI & WebUI & MCP --> API
API --> Config & Session & Skills & Tasks
Config --> CodexDir & ClaudeDir & ClawDir & OpenCodeDir & MateDir
Session --> State
Skills --> Local
Important
This project is currently in early stage. We are seeking developers to help build the local agent ecosystem!
Special thanks to all contributors for their contributions to Codex Mate ❤️
Apache-2.0