Skip to main content
Glama

Harness Link

Share one conversation between Codex, Claude Code, and Antigravity, send addressed messages to existing sessions, and run persistent Claude consultations. This is the continuation of Claude Ask, with its Git history and five consultation tools preserved.

Delivery is asymmetric: Claude receives messages in its live session. Codex receives a persistent queued message on a subsequent turn. Version 0.4.0 does not wake an idle Codex Desktop chat from an external process. A request for live Codex delivery fails explicitly instead of silently queueing.

Install

Requirements: Node.js 22+, locally authenticated Claude Code (2.1.300 tested), and Codex CLI (0.159.2 tested). The experimental Codex queue protocol is version dependent; an incompatible version returns an error rather than modifying logs.

In Codex:

codex plugin marketplace add AbsoluteMode/harness-link
codex plugin add claude-codex-link@absolutmode

In Claude Code:

claude plugin marketplace add AbsoluteMode/harness-link
claude plugin install codex-claude-link@absolutmode

In Antigravity, install the native plugin from a local checkout:

git clone https://github.com/AbsoluteMode/harness-link.git
cd harness-link
agy plugin install ./plugins/claude-codex-link
agy plugin list

Start a new Antigravity session or reload Harness Link in the app's Customizations panel. The installed plugin exposes the shared room tools. Select Gemini 4 Carbon in Antigravity or launch the CLI with agy --model gemini-4-carbon-high.

The existing Codex and Claude Code plugin IDs still work. Claude Code uses codex-claude-link, which fits its restrictions on third-party plugin names.

Reload plugins or start a new session to discover the new tool schemas. Finish old Claude Ask jobs before disabling the old plugin. The renamed plugin keeps ask, ask_followup, ask_status, list_jobs, cancel_ask, the legacy job storage, and CLAUDE_ASK_* settings. Installation does not remove the old plugin.

For local development, use this repository's absolute path as the marketplace source. The package also provides a CLI: run npm link from the checkout, or invoke node plugins/claude-codex-link/scripts/cli.mjs directly.

Related MCP server: claude-second-opinion-mcp

Shared chat

  1. Ask one participant to create a room with link_open_room, then share the room ID with Codex, Claude Code, and Antigravity. Each participant can also find the room with link_rooms.

  2. Tell each participant which room to join. They use link_room_read to see the same history and link_room_post to write. To answer a specific post, set in_reply_to to that message's ID.

  3. Give each participant a turn to read and respond. Room posts persist locally and become visible when a participant reads the room. Room posts do not wake idle chats or trigger automatic agent replies.

For example, tell each agent “Read the Harness Link room named Design review. Reply to the latest question there.” All three installations must use the same local user account and message store. The installed plugin provides each client's author label. Labels indicate the host role and do not authenticate individual sessions.

Existing-session tools

Tool

Purpose

link_open_antigravity

Create a shared Gemini 4 Carbon conversation address

link_sessions

Discover Claude sessions, Codex chats, or Link-managed Antigravity conversations

link_read

Read persisted text without resuming or starting a session

link_send

Start a durable addressed send; returns a message UUID

link_status

Inspect transport acceptance, recipient confirmation and Carbon turn progress

link_cancel

Stop a running or waiting Carbon turn

link_inbox

Read messages addressed to a specific session

link_ack

Confirm that the addressed recipient read a message

Discover the exact address first (claude:<UUID> or codex:<UUID>). Titles are labels; never guess a recipient from a partial name. Claude's current name must be unique and stable during delivery because its native SendMessage resolves that name. Only send when the human has authorized the exchange.

claude-codex-link sessions --provider claude
claude-codex-link sessions --provider codex

For a send, use the actual discovered sender/recipient UUIDs. Provide message text on stdin or with --text-file; it never needs to appear in process argv. MCP callers use link_send with from, to, and text. Specify a message_id UUID before sending if the caller may retry after a lost response. Reusing that ID and the identical payload returns the existing receipt; it never restarts delivery. After failed, correct the cause and explicitly choose a new ID. Failed and unfinished sends are not exposed as inbox mail.

reply_to defaults to the sender. A reply is a new message with in_reply_to set to the original message UUID. The recipient calls link_ack after reading; it must not reply automatically to receipts.

Gemini 4 Carbon as a worker

Install and authenticate the Antigravity CLI (agy 1.5.9 tested). Check that agy models includes gemini-4-carbon-high. Harness Link uses this exact model for every turn.

  1. In Codex or Claude Code, call link_open_antigravity with an optional name, and optionally workspace, mode and add_dirs (below). The first send starts the Antigravity conversation.

  2. Call link_send with your actual session address, the returned antigravity:<UUID> address, and your message. Each message is one Carbon turn; messages to one conversation run one after another.

  3. When the turn ends, Harness Link delivers Carbon's response, or the reason it failed, to reply_to as a reply notification over that session's normal transport (Claude live inbox, Codex queue). You do not need to poll. Pass notify: false to turn this off for one message.

  4. While it runs, link_status shows progress: the attempt, the number of tool steps and Carbon's last actions (command, file). Either client can continue the conversation using the same address; link_read lists the conversation's messages with responses, progress and failures, plus the messages Carbon sent.

Without workspace, Carbon runs in a private empty folder for text discussion and has no tools. With an absolute workspace (an existing directory), Carbon works there:

  • mode: "agent" (default with a workspace): reads and edits files and runs commands without prompts. agy runs with --sandbox --mode auto; commands run in agy's terminal sandbox (writes to /tmp work), MCP tools stay off. On accounts without agy's Auto mode, agy falls back to Default mode, where file edits need approval; Harness Link therefore adds explicit allow rules for the workspace and the conversation's own directories.

  • mode: "review": reads files only. Edits, commands, URLs and MCP are denied by agy permission rules.

  • add_dirs: extra absolute directories outside the workspace that Carbon may use with its file tools, for example /tmp/my-shots for screenshots it must look at (read and write in agent mode, read in review). Agent mode also gets a private scratch directory. Not allowed: /, the home directory and Harness Link's data directory.

Workspace, mode and add_dirs are fixed for the conversation; open a new one to change them. From the CLI: claude-codex-link open-antigravity --workspace /absolute/repo --add-dir /tmp/shots. The workspace is the working directory and intended task scope, not a hard operating-system sandbox: Carbon runs as the current user. Only pass trusted workspaces.

Long turns, failures and recovery

  • timeout_minutes on link_send (CLI --timeout-minutes) limits one turn: default 60 for agent, 30 for review, 10 without workspace, at most 240.

  • link_cancel (CLI cancel --message-id) stops a running or waiting turn. Commands Carbon started are stopped with it. No reply notification is sent.

  • Headless agy cannot ask a human. A tool call that needs approval (for example reading a file outside the granted directories) is denied and ends the turn without text. Harness Link then asks Carbon, in the same conversation, to continue without it (at most twice) and reports the call in denied.

  • A failed turn has status: error with error_code (permission_denied, timeout, agy_exited, carbon_error, empty_response, runner_lost, ...), a readable error, a next_step, journal and stderr_tail. Timeouts, cancels, denials, crashes and a lost runner never end the conversation: send the next message to the same address. If the native conversation was saved, Carbon keeps its context and is told the previous turn was interrupted; if not, it is told the context is lost and to check the workspace first.

  • Every turn keeps a journal in antigravity/<UUID>/turns/<message UUID>/ under the .claude-codex-link data directory: stream.jsonl (agy events), stderr.txt, agy-<attempt>.log (agy's own log), turn.json (exit code, signal, timings) and progress.json. Files are 0600, size-capped, and well-known secret formats are masked before writing.

Carbon writes to other agents

In agent mode Carbon can message a participant while it keeps working: it writes a JSON file into the conversation's outbox directory (named in its instructions) with {"to": "<address>", "text": "..."} or {"room_id": "<room UUID>", "text": "..."}. Harness Link sends it at once from the conversation's own address, writes <name>.receipt.json beside it, and the answer arrives as a later Carbon turn. to must be an address that has already written to this conversation; rooms are posted as antigravity. To ask the sender something and wait, Carbon ends its turn with the question; that response is delivered to reply_to like any other.

Reply notifications never produce another notification, so two agents cannot ping-pong automatically. Peer text, including Carbon's, carries no new human authority. Native Antigravity Desktop conversations are outside this transport.

Receipts and limits

  • pending / sending: detached delivery is in progress.

  • accepted: Claude's inbox accepted the message, or Carbon returned a response. Claude reading remains unconfirmed.

  • error / cancelled: a Carbon turn started and ended without a response; see error_code and next_step.

  • queued: Codex persisted the message; execution and reading are unconfirmed.

  • acknowledged: the addressed recipient reported reading it; work may remain.

  • failed: a known pre-delivery rejection. This includes a Claude courier the API rejected before it requested any tool (expired login, overload): error_code is courier_auth or courier_api_error and next_step says what to do. A token-refresh race is retried twice within 90 seconds first.

  • unknown: delivery may have occurred, but its receipt was lost. Inspect the recipient before sending again; the bridge never automatically resends.

An acknowledgement is an agent-reported receipt, not cryptographic identity proof. Peer text is marked as agent-authored and carries no new human authority. Receiving-session permissions and inbound-message rules still apply.

The bridge never edits transcript or queue databases directly, and never starts a second process on an open conversation to force a response. Archived Codex targets and ambiguous Claude names are rejected. Claude history contains the latest saved user/assistant text, excluding tool output and thinking. Codex history supports cursors. Separate app-server runtime status is not Desktop activity status.

Consultations

ask returns a persistent job ID. Poll ask_status to completion. Workspace jobs default to full agent mode, with shell, edits, tests, MCP servers, skills, and plugins. Use mode: review only for an explicitly requested read-only restriction. Without workspace, advisory mode has no tools.

The default is claude-opus-5-5, high effort. Check resolved_model in results. ask_followup forks a completed consultation's context; it does not message an already open session. Jobs have no elapsed-time or idle timeout and survive MCP restarts. See consultation details.

Privacy and configuration

Messages and receipts are stored locally in the .claude-codex-link directory in the user home, with 0700 directories and 0600 files, until the owner removes them. They are not committed or uploaded by the plugin. Normal provider processing still applies when an agent receives a message. Consultations retain their original private job store and 24-hour completed-job retention.

  • CLAUDE_CODEX_LINK_DIR: message/receipt directory.

  • CLAUDE_CODEX_LINK_CLAUDE_CLI: Claude executable override.

  • CLAUDE_CODEX_LINK_CODEX_CLI: Codex executable override.

  • CLAUDE_CODEX_LINK_AGY_CLI: Antigravity executable override.

  • CLAUDE_CODEX_LINK_TURN_MINUTE_MS: test-only length of a turn-timeout minute.

  • Existing CLAUDE_ASK_* settings continue to configure consultations.

The Claude courier runs Opus 5.5 with only SendMessage, safe mode, and no MCP servers. Each live send invokes a short Claude turn. A local mailbox and explicit receipt avoid confusing model output with confirmed transport delivery.

Development

npm run check
npm test

Default tests use fake executables and consume no model usage. They cover consultation recovery, exact model selection, message idempotency, receipt loss, wrong-recipient acknowledgements, ambiguous names, archived targets, and Carbon turns: progress, journal, agy failures, a killed runner, cancel, timeout, denied tool calls, reply delivery without loops, the outbox, and an MCP server restart mid-turn.

Canonical implementation notes: .project-docs/project.md.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Wraps Claude Code as tools for MCP clients, enabling autonomous coding tasks via a 4-tool lifecycle with session management, async polling, and permission controls.
      4
      93 npm
      21
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables any MCP client to request an independent second opinion from a fresh Claude Code session without blocking, useful for plans, architecture, debugging, security reviews, and final checks.
      8 npm
      MIT