Use Case 01 · Multi-Assistant Continuity
Cold Handoffs Between Claude Code, Codex CLI, Copilot & Cursor
The engineering problem
When you hit rate limits in Claude Code, switch to Codex CLI for a refactor, or open Cursor for UI work, every new session starts cold. Pasting chat transcripts wastes context tokens and silently drops architectural constraints or in-flight task versions.
How Cairnmind enforces a better boundary
- Cairnmind maintains one local project store outside every assistant process, holding versioned plans, task dependencies, source snapshots, and reviewed architectural decisions.
- When a fresh assistant connects via MCP, it receives a bounded, checksummed resume packet (schema_version: 2) with a recomputed state_hash covering the active plan, next task, scoped records, and current worktree code fingerprint.
- Session writes are refused until the assistant calls ack_resume with the exact packet and plan/task versions. If another session updates the plan concurrently, expected_version CAS rejects stale overwrites.
- External MCP clients (Cursor, Cline, Windsurf, Zed, VS Code) participate safely through cairnmind mcp generate presets, with their writes transparently stamped origin_evidence: degraded.
Concrete workflow
1. Bind installed assistants to the project
$ cairnmind install my-app Configures MCP entries, hooks, instruction blocks, and optional cairnmind-recorder for installed clients only.
2. Start session A (e.g. Claude Code)
$ cairnmind run my-app claude Session acknowledges resume packet v2, saves a proposed decision and versioned plan, and records checkpoint state.
3. Hand off cold to session B (e.g. Codex CLI)
$ cairnmind run my-app codex Fresh Codex session loads the exact plan version, active task, source quotes, and code fingerprint without pasting chat history.
4. Inspect alignment or connect an external IDE
$ cairnmind mcp generate --client cursor --write Atomically merges an external MCP preset with backup and zero auto-approval flags.
What is guaranteed
- Session writes never succeed without acknowledging the live state_hash and exact plan/task versions.
- Concurrent sessions cannot silently overwrite plan steps thanks to optimistic concurrency (expected_version).
- External MCP writes are always server-marked degraded and never shown as verified evidence.
Known limits
- ACK proves receipt and readback of specific versions, not that the model reasoned perfectly about them.
- Each coding assistant still uses its own account billing, context window, and native tool permissions.