Copied
AgentRelayWatch · 值更
Cross-CLI coding-agent session handoff
GitHub
⏱️ Relieving the watch Local · Open source · MIT

AgentRelay (Watch · 值更): when Claude Code hits its limit, hand the session to Codex, OpenCode or Kimi CLI.

Watch (Chinese 值更, "relieving the watch") is a local session-handoff tool for AI coding agents. When Claude Code, Codex, OpenCode or Kimi runs out of quota or gets stuck, it reads the saved session record on your machine, converts it into a format the target tool can resume, and keeps the original working directory. Tool events may be degraded to text; degraded items are listed in the result.

$git clone https://github.com/can4hou6joeng4/Watch.git

No npm package and no packaged desktop installer yet. Build the desktop app from the repository; the validated platform is macOS arm64.

Adapters
6 · 4 usable
Watch servers
0
License
MIT
Acceptance records
41
Mechanisms

What Watch actually does

No zero-loss promise. These four mechanisms exist in the code, with their limits.

Maps messages and tool events, discloses degradation

Agents store sessions differently. Watch parses messages, thinking and tool call / result events and maps the format; anything the target cannot represent is degraded to text or a placeholder, and the degradations and warnings are returned with the result instead of being swallowed.

Local processing, no relay server

Watch reads and writes the session files and SQLite stores on your machine. No account, no Watch server, no upload of sessions or code. Handoff is still not always offline: creating a Kimi session runs the Kimi CLI, and the official Codex import starts the local Codex app-server with your existing credentials.

CLI plus a macOS desktop shell

The CLI runs on Node with tsx; the desktop app is a thin Tauri + Rust shell with all logic in TypeScript. Cards launch the target agent in a terminal and fall back to copying the command. Validated on macOS arm64; Windows and Linux build but are not validated.

Atomic replacement and an import lock

Whole-file writes go temp file → fsync → re-parse with the same adapter → one .bak → rename, and are refused if the target's fingerprint changed. The official Codex import holds a Watch-only lock and keeps an execution log. Append paths do not have equivalent protection.

Adapter status · 2026-09-13

Support status per agent

An official interoperability feature is not proof of Watch integration. Each row follows docs/COMPATIBILITY.md and the dated evidence records.

AgentLookupDirectionMechanismStatus
Claude Code✓ native session ID lookupsource or targetlocal JSONL history, strict cwd matchadapter usable
OpenAI Codex (CLI and Desktop)✓ thread ID and project mappingClaude Code → Codex official single-session import: prepare / confirm / statusproject-first, Watch import lock and execution logreal click-through 2026-09-10
macOS arm64 · Codex CLI 0.153.4 · model continuation not verified
OpenCode✓ SQLite store lookupCLI adapter with path isolation and native-ID repairSQLite transaction with row-count checkCLI adapter usable
official Web / TUI import path validated in isolation, not integrated
Kimi CLI✓ session indexincremental history then resumecreating a session invokes the local kimi CLIadapter usable
Pi CLI · Grok CLI✓ session file parsingcore conversion with copy-command fallbackadapters retained; Grok has no desktop cardnot validated

Prerequisites

  • Node.js ≥ 22.13 (node:sqlite is required; older Node fails at module load).
  • The agent CLIs you use, installed and authenticated; the desktop app currently also needs an external Node.
  • Claude Code → Codex Desktop import requires the project folder to exist in Codex Desktop first, and the --experimental flag.

Not supported or not promised

  • Antigravity and Claude Desktop Code: researched, not integrated.
  • Windows and Linux: buildable, not validated on real machines.
  • Attachments are dropped with a text placeholder; Claude thinking is degraded to text.
  • No zero-corruption guarantee, no quota bypass, no code or worktree migration, no identical model behaviour.
3-Step Workflow

Hand off a session in three steps

  1. 01

    Get the native session ID

    Copy the current session ID from Claude Code, OpenCode or any running terminal and paste it into the Watch desktop app, or pass it to the CLI.

  2. 02

    Check the source and working directory

    Watch detects the source agent, the project directory (cwd) and the turn count. If detection fails, do not resume with another tool blindly; check the directory yourself first.

  3. 03

    Hand off to the target tool

    Click the target agent card: launch it in a terminal, open the official Codex import preview and confirm, or just copy the command and run it yourself.

Install from source

Install from source

There is no npm package and no packaged installer yet. Clone, install, then inspect the current directory's sessions with the CLI. Build the desktop app yourself with Tauri inside desktop/.

  • Cannot find package 'tsx' means npm install has not run.
  • ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite means Node is older than 22.13.
  • An uncertain official Codex import keeps its log and lock and is never retried automatically; check status first.
$ git clone https://github.com/can4hou6joeng4/Watch.git
$ cd Watch && npm install
$ npm run watch -- status --json
$ npm run watch -- import-codex prepare <claude-id> --cwd /abs/project --desktop-project --experimental --json
Evidence

Acceptance records and changelog

Every status maps to a dated, version-bound JSON record under docs/evidence/ in the repository (append-only). Three key records:

  1. Official single-session import passes native read and resume. Tool events degraded to text on the Codex side; source file unchanged; Codex CLI 0.153.4, macOS arm64; model continuation and desktop UI not run. codex-native-2026-09-07-official.json
  2. Project-first import visible in the ChatGPT Desktop project list. Deep link opened the expected thread with the title marker; ChatGPT Desktop 26.901.51231; manual GUI acceptance, no model continuation. codex-desktop-project-first-gui-2026-09-08.json
  3. Real Watch desktop click-through: prepare → confirm → open thread. macOS 26.6.2 arm64, Codex CLI 0.153.4, ChatGPT Desktop 26.903.61454; synthetic fixture, two same-target opens; model continuation still not verified. watch-codex-import-tauri-native-2026-09-10.json
  4. Site rewritten. Copy aligned with the repository docs; prerequisites, unsupported list, evidence and this English page added; MIT LICENSE added to the repository.
FAQ

Frequently asked questions

Claude Code hit its rate limit. How do I continue?
Copy the Claude Code session ID from your terminal and paste it into Watch. Watch reads the local session record and its working directory (cwd). Pick OpenAI Codex, OpenCode or Kimi, and Watch converts the messages, tool calls and results into the target client's format and launches the target agent in the same directory. Tool events may be degraded to text; the result lists what was degraded.
Is my code or my API key uploaded anywhere?
Not by Watch. It has no server, account or telemetry; reading and conversion happen on your computer and the result is written only into the target agent's local session store. Two things do reach the network: the kimi CLI when Watch creates a Kimi session, and the local Codex app-server during an official Claude Code to Codex import, which reads your ~/.codex configuration. Afterwards the target tool calls its model as usual.
Will a handoff damage the target client's existing history?
The official Codex import writes only after you confirm the preview and holds a Watch-only import lock; that lock is not Codex's native mutex and does not stop a running Codex task. Direct-file targets use atomic replacement: write a temp file, re-parse it with the same adapter to verify, keep one .bak copy, then rename. Append paths are less protected, so test with a disposable session first.
Why not just paste a summary prompt into the new tool?
A natural-language summary drops tool calls and results, failed attempts and the exact state. Watch keeps the structured message context so the next agent sees the whole trail from the original task to the current state.
What is YOLO mode? Is it risky?
Off by default. When enabled, Watch only adds the target CLI's own bypass flag (for example -y) to the generated command. The risk is whatever that CLI does with the flag; it is not a desktop or file-system permission setting.

Maintainer

can4hou6joeng4, developer, Guangzhou. Watch is one ship of the personal "The Fleet" projects, alongside Atlas, a local-first macOS menu-bar app for AI coding usage and cost.

Contact: GitHub Issues · bobochang.cn · github.com/can4hou6joeng4

This page loads Google Fonts and is hosted on Cloudflare Workers; it contains no analytics script.