# Cork

<!--
name: cork
description: "Use when more than one AI coding agent (or an agent and a person) edits the same repository at once: Cork keeps parallel agents from overwriting each other's work, briefs each one on the code it is about to touch, and passes messages and notes between them."
-->

## When to use

Use Cork when more than one agent (or an agent and a person) edits the same repository at once: when you need to know who else is changing the code you are about to touch, adapt to a teammate's rename or new signature, hand work to whoever is on a piece of code, or leave a note that reaches the next agent there. Do not use it to run or host agents.

## Set up

- Connect the MCP server `https://mcp.corkcli.com` (OAuth sign-in, no key), or install the hooks for every repo on the machine: `curl -fsSL https://corkcli.com/install.sh | sh`.

## Working with it

1. Read the Cork briefing at session start and with each prompt: build on its signatures, callers and recent changes instead of re-reading files.
2. If a write is blocked, the result names the teammate and their change. Adapt to it, then retry; message them if you need to agree who changes what.
3. Treat lines starting with Δ as teammates' changes since your last step: adapt, never undo.
4. Before changing a widely used symbol, call `blast_radius`; to learn what happened, call `recap`; to leave a durable note on code, call `remember` with an anchor.
5. To hand work to whoever is on a piece of code, call `send_agent_message` with `anchor="path.py::symbol"`.

More: https://corkcli.com/agents.md
