RELAY ARCHITECTURE / CLAUDE CODE · CODEX · CURSOR

Continue Claude Code Work in Codex or Cursor Without Losing Context

When rate limits hit or you want another agent harness to inspect tests and refactorings, pasting ad-hoc summaries drops stack traces and rejected attempts. This workflow explains how Senrelay (GitHub repository qingsongcui/ContextCore) bridges 6 core coding agents using short-brief discovery, paged full transcripts, and stand-by safeguards.

Verified: 2026-11-15 Scope: 6 Core Context Hosts (macOS Apple Silicon) Open Source: $0 · MIT License · No Signup
Three Safeguards Built Into Relay

Short Briefs Before PayloadTyping /contextcore fetches concise IDs, timestamps, and worktree summaries first—never blowing your context window upfront.

Paged Full-Transcript CompactionYour receiving agent reads exact turns sequentially via read_conversation_messages and compacts them on the spot, keeping stack traces intact.

Stand-By Lock on NumbersReplying with just a selection number enforces must_not_execute=true: the agent reports status and blocks until you approve next steps.

01 · SIX-STEP RELAY PROTOCOL

6-Step Cross-Agent Relay Flow

When Claude Code hits a usage cap mid-debug—or you prefer Codex CLI, Cursor, or OpenCode for final test verification—keep both clients pointed at local loopback http://127.0.0.1:8420/mcp/ under MCP key contextcore (see Verified Config Paths Across 15 Agents):

  1. Work Normally in Host A: Senrelay indexes local transcripts across the 6 core hosts (Claude Code, Codex, Cursor, Antigravity, OMP, OpenCode) while tracking working_tasks and source-linked memories.
  2. Invoke Relay in Host B: Open Codex, Cursor, OMP, or OpenCode and enter /contextcore (or say "Relay").
  3. Pick From Short Briefs: list_relay_conversations returns numbered sessions with project path, Git worktree branch, recency, and concise summary.
  4. Page Complete Transcript Turns: Once selected, read_conversation_messages iterates page by page through complete original messages and tool results so the new model compacts live truth directly.
  5. Disambiguate Git Worktrees: Sessions stay partitioned by exact worktree path so concurrent branches inside one repository never bleed into each other.
  6. Controlled Hand-Over: Combining workspace diffs, active working_tasks, and pinned constraints, Host B waits for approval on number-only replies or proceeds when a task accompanies your choice.
02 · STAND-BY VS EXECUTION

Why Replying With a Number Won't Touch Files Yet

Developers hesitate to hand active edits to a second model when they worry it will rush ahead and break files. Senrelay separates inspection from execution via two explicit reply modes:

Mode A · Number-Only Selection (must_not_execute=true)

Sending just 1 passes must_not_execute=true to relay_conversation. The receiving client summarizes verified changes, failed hypotheses, and pending steps, then pauses cleanly without editing files or running destructive shell commands.

Mode B · Number + Action Instruction

Sending 1 - fix the failing webhook test and run pytest tells the receiving agent to load full context plus working_tasks and immediately pick up execution.

Sample Terminal Sequence

# Step 1 · Trigger short-brief listing inside Codex CLI or Cursor
You: /contextcore

# Compact numbered list keeps initial token cost tiny
[1] Claude Code · 14m ago · ~/work/payment-service (worktree: fix-webhook)
    Debugging Stripe webhook idempotency race; 1 timeout test left
[2] Cursor · 2h ago · ~/work/payment-service (worktree: main)
    Drafting billing reconciliation index migration SQL

# Step 2A · Number only -> inspects transcript, reports status, stands by
You: 1

# Step 2B · Number + explicit task -> continues editing and verifying
You: 1, run pytest -k webhook first and propose the minimal fix
03 · COMPLEMENTARY LAYERS

How AGENTS.md, MCP, and Session Relay Fit Together

Senrelay complements repository convention files and MCP servers rather than duplicating them—covering the live mid-task layer between static rules and external tools:

Table 1 · Three Non-Overlapping Context Layers
Layer Primary Artifact Lifespan Problem It Solves
Layer 1 · Static Repo Rules Git-committed AGENTS.md / CLAUDE.md Repository-wide across OSes Codifies build steps, style guardrails, and PR test commands on Windows, macOS, and Linux ($0).
Layer 2 · Tools & Shared Memory Local contextcore /mcp/ endpoints Cross-session workspace state Maintains working_tasks, provenance-linked project memories, and safe budget-checked rules.
Layer 3 · Mid-Task Relay /contextcore paged full-transcript flow Single live task handoff Transfers failed experiments, tracebacks, and file decisions between 6 Mac hosts without manual copy-paste.

Not sure whether AGENTS.md, cloud memory MCP, or local relay fits best? Compare options honestly in our 5-way decision guide. On Windows or Linux, skip Senrelay and ask your outgoing client for a concise HANDOFF.md.

04 · SCOPE, INSTALL & ATTRIBUTION

Platform Limits, Install & Identity (Checked 2026-11-15)

When Senrelay Is the Wrong Tool

$0 under the MIT License (v1.0.0-beta.2), restricted strictly to single-machine macOS 14.0+ on Apple Silicon (arm64). Not for Windows, Linux, Intel Macs, cloud multi-device sync, or transcript relay on the 9 extended config-only hosts.

Disambiguation & Setup

Senrelay (github.com/qingsongcui/ContextCore) is unrelated to context-core.dev and the PyPI contextcore package. Install on Mac via brew install --cask qingsongcui/tap/senrelay and clear Beta quarantine with xattr -cr /Applications/Senrelay.app. Built by Qingsong Cui (George O'Nair) (X @George_ONair)—see the Setup Guide.

05 · WORKFLOW FAQ

Relay Workflow FAQ

Why page original transcripts instead of pre-summarizing every turn?

Background summaries routinely strip exact error lines, file diffs, and failed hypotheses. Reading bounded pages of raw turns via read_conversation_messages lets the receiving model compress details tailored to its next task.

How does relay avoid mixing parallel git worktrees in the same repository?

Sessions stay indexed by exact working directory and worktree path. Both short-brief listings and relay tool inputs surface the worktree path explicitly before loading turns.

Can I use /contextcore relay without letting Senrelay write all host configs?

Yes—session reading, host file modifications, and local model downloads ask for separate confirmations. Pairing relay with working_tasks and source-linked memories keeps long tasks organized, but remains opt-in.

What should Windows or Linux developers use instead of Senrelay?

Senrelay is currently $0 MIT open source for Apple Silicon macOS only. Cross-platform teams should use Git-tracked AGENTS.md plus a short HANDOFF.md generated before switching agents, or review all 5 options in our comparison guide.