---
title: "Messaging between your coding agents with cork message · Cork"
description: "Use cork message to reach every coding agent in a repo, one agent, or whoever is working on a function, across Claude Code, Codex and Cursor. With examples."
canonical: "https://corkcli.com/blog/cork-message-coding-agents"
last_updated: "2026-11-14"
published: "2026-10-03"
author: "Kevin Vera"
---

# Messaging between your coding agents with cork message

Use cork message to reach every coding agent in a repo, one agent, or whoever is working on a function, across Claude Code, Codex and Cursor. With examples.

By Kevin Vera · October 3, 2026 · [Guides](https://corkcli.com/blog/c/guides) · 5 min read

To message the coding agents working in a repo, run `cork message "..."` from the repo: it reaches the other agents there, whether they run in Claude Code, Codex or Cursor. Add `--to agent-xxxx` to reach one agent, or `--about path.py::symbol` to reach whoever is working on that function without knowing which agent it is. Agents can send the same messages to each other. On one machine this is part of Cork Free; on the paid plan it reaches agents on teammates' machines too.

## Why agents need to talk at all

Parallel agents work from their own context. Each one knows what it was asked to do and what it has read, and nothing about what the others decided five minutes ago. That gap shows up as:

- an agent starting a change another agent is about to make obsolete;
- a finding (the API returns cents, not dollars) that one agent learned and three others will learn again the hard way;
- a handoff ("tests for the parser are yours now") that lives only in your head.

Built-in options exist, with limits. Claude Code's cross-session messaging lets Claude message "your other Claude Code sessions on this machine," and your own sessions elsewhere through Remote Control. Messages are plain text, and Claude decides when to send one unless you ask. Agent teams have a mailbox between teammates of one lead session. In the Claude Code docs' words, "in every approach the workers are Claude sessions," so a Codex or Cursor agent on the same repo, or a teammate's agent, is outside these channels.

## The three ways to address a message

`cork message` has three targets.

**Everyone in the repo.** With no flag, the message goes to the other agents in the repo:

```bash
cork message "Main is broken by the migration in 4f2a; don't rebase until it's fixed"
```

Use this for things every agent should know: a broken build, a freeze, a decision that affects the whole codebase.

**One agent.** With `--to`, the message goes to a single agent by its id:

```bash
cork message --to agent-xxxx "Stop work on the CSV exporter; that ticket was cancelled"
```

Use this when you know exactly which agent needs it, for example one you started yourself in another terminal.

**Whoever is working on a function.** With `--about`, the message is anchored to code and reaches whoever is working on that symbol:

```bash
cork message --about billing/invoice.py::total_due "total_due must keep returning cents; the mobile app depends on it"
```

This is the most useful form on a busy repo. You often do not know which agent, or whose agent, is in a function right now, but you know the function. Anchoring the message to `path.py::symbol` routes it to the right place.

## Messages between agents

People are not the only senders. Any agent can message the others in the repo, one agent, or whoever is working on a given function. You can prompt it directly:

> Tell whoever is working on `auth/session.py::refresh_token` that I changed the token TTL to 15 minutes.

That turns a finding in one agent's context into a message in another's, without you copying text between terminals.

## Patterns that work

**Handoffs.** When an agent stops partway through something, have it message whoever will pick up the code: what is done, what is not, and what it learned. Anchor it with `--about` to the function in question.

**Warnings before a breaking change.** Before a rename or signature change, message the code it touches:

```bash
cork message --about api/client.py::fetch_user "Renaming to get_user and adding a required tenant_id arg in the next 10 minutes"
```

Cork also detects the change itself when it lands (other agents hear it on their next step, and the rename becomes a [semantic lint](https://corkcli.com/blog/semantic-lint) rule), but a warning lets them plan instead of react.

**Stand-downs.** When two agents are clearly heading for the same work, tell one to stop with `--to`.

**Team-wide notices.** On the paid plan, a plain `cork message` in a shared repo also reaches teammates' agents, so "main is broken, hold your pushes" reaches the whole team's agents at once.

## What not to use messages for

Messages are for things that change what another agent should do soon. Two things fit better elsewhere:

- **Durable decisions.** "We never cache this endpoint" should outlive today's sessions. Use `remember` with the code it applies to; agents get it back through `recall`.
- **Edit safety.** You do not need to message before every edit. Cork's [write gate](https://corkcli.com/blog/write-gate) already holds an edit against code another agent is changing right now until your agent has their version, and live awareness tells agents about renames and new signatures on their next step.

## How Cork helps

Cork is the [coordination layer](https://corkcli.com/blog/coordination-layer-ai-coding-agents) for multiplayer coding agents: it keeps Claude Code, Codex and Cursor agents, on one machine or across a team's machines, from overwriting each other on one codebase, and hands each agent what the others already learned.

Messaging is one part of that. It works across Claude Code, Codex and Cursor, it can target code instead of a session name, and on the paid plan it crosses machines. Cork Free covers unlimited agents on one machine with no account. Install it with:

```bash
curl -fsSL https://corkcli.com/install.sh | sh
```

## Frequently asked questions

### How do I send a message to all my coding agents at once?

Run `cork message "..."` in the repo. It reaches the other agents working there, in Claude Code, Codex or Cursor.

### How do I message the agent working on a specific function?

Use `--about` with the file and symbol, for example `cork message --about billing/invoice.py::total_due "..."`. It reaches whoever is working on that function.

### Can Codex and Claude Code agents message each other?

With Cork, yes: messaging covers agents in Claude Code, Codex and Cursor on the same repo. Claude Code's built-in cross-session messaging covers Claude sessions only.

### Do messages reach my teammates' agents?

On the paid plan, yes, agents across the team see each other. On Cork Free, messages stay on one machine.

## Sources

- <https://corkcli.com>
- <https://code.claude.com/docs/en/cross-session-messaging>
- <https://code.claude.com/docs/en/agent-teams>
- <https://code.claude.com/docs/en/agents>

## Related reading

- [Getting started with Cork's MCP tools: get_symbol, blast_radius, recap, remember](https://corkcli.com/blog/cork-mcp-tools-get-symbol-blast-radius-recap-remember): Use Cork's MCP tools in Claude Code, Codex and Cursor: get_symbol, blast_radius, recap, remember and recall, with when to call each and example prompts.
- [Cork vs Claude Code agent teams: one session's crew, or every agent on the repo](https://corkcli.com/blog/cork-vs-claude-code-agent-teams): Cork vs Claude Code subagents, agent teams and cross-session messaging: what each coordinates, where agents collide, and when to use both together.
- [MCP servers for coordinating coding agents: what they are and how to use one](https://corkcli.com/blog/mcp-servers-coordinating-coding-agents): What an MCP server for coordinating coding agents does, how it differs from hooks, and how to connect one to Claude Code, Codex, Cursor and Gemini CLI.
- [Setting up Cork for a team of five](https://corkcli.com/blog/cork-team-of-five-setup): Set up Cork for a five-person team running Claude Code, Codex and Cursor agents: install, login, agent hours, AGENTS.md, working habits, and what it costs.

[All articles](https://corkcli.com/blog.md) · [Cork in Markdown](https://corkcli.com/index.md) · [llms.txt](https://corkcli.com/llms.txt)

This page in HTML: https://corkcli.com/blog/cork-message-coding-agents
