CoagySign in
← Blog

How to share Claude Code context with your team

Ted ·

A thing that keeps happening on teams using coding agents: someone asks "why did we do it this way?" and the honest answer is "it came up in a Claude Code session on Sam's laptop last Tuesday."

The code got merged. The reasoning didn't. It's sitting in a transcript file in Sam's home folder, and nobody else is ever going to read it.

This gets worse the more agents you run. One person with one agent can keep it in their head. Four people each running a few sessions a day can't. Here's what actually helps, roughly from least to most effort.

1. Put the rules in a file every agent reads

Every coding agent reads a project instructions file at the start of a session:

  • Claude Code reads CLAUDE.md
  • Codex and Cursor read AGENTS.md
  • Gemini CLI reads GEMINI.md by default

If your team mixes tools, keep the real content in AGENTS.md and make CLAUDE.md a one-liner that says "read AGENTS.md". That's what we do in the Coagy repo. One file to update, every agent gets it.

Commit it. Review changes to it like code. When a teammate's agent learns something the hard way ("never run the migration before the backup"), it goes in this file, not in someone's memory.

What it's good for: rules, commands, where things live. What it's not good for: the story of why a specific decision got made.

2. Make the agent write the decision down

At the end of a session where something got decided, ask the agent to write it up:

Write a short note in docs/decisions/ about what we decided in this
session and why, including the options we rejected.

Then it goes in the same PR as the code. Reviewers see the reasoning next to the diff, and six months from now git log on that file tells you who decided what.

This is the cheapest habit with the biggest payoff. The agent already has the whole conversation in context, so writing the summary takes it ten seconds.

3. Export the session when it matters

Claude Code keeps every session as a JSONL file under ~/.claude/projects/, one folder per project. You can resume your own sessions with claude --resume, but those files never leave your machine.

For the sessions that really matter, /export in Claude Code saves the conversation as text you can drop into a PR description or a doc. It's manual, so you'll only do it for the big ones, which is fine.

4. Say what your agent is working on before it starts

Most "two agents edited the same file" pain comes from nobody knowing what anyone else's agent was doing. A one-line message in your team channel ("my agent is refactoring the billing webhooks, stay out of api/billing for an hour") prevents a surprising amount of it.

It's low-tech and people forget. But even a rough habit beats finding out at merge time.

5. Use a tool built for it

This is the problem we're building Coagy for, so take this part with the obvious grain of salt.

You run a small connector on your computer and turn on session sharing once:

workspace-runner mirror on

After that you keep using Claude Code or Codex exactly like before, in your terminal or editor. Each session shows up live in your Coagy workspace. What your teammates see is deliberately limited:

  • By default, your session is private to you. Teammates see that your agent is working, which agent it is, and its status. Not your prompts.
  • When something's worth sharing, you publish it. You write and preview exactly what goes out, like the decision note from step 2, and it's there for the whole team (and their agents) to search later.
  • When you want to work on something together, you start a shared task, and everyone who joins sees that session's messages and results.
  • Teammates can ask your session a question. You see the draft answer and decide what gets sent back.

Agents still run on each person's own computer with their own AI account, so you don't hand your repo to a cloud service and nobody burns a teammate's usage limits. (What does get sent, like the diffs your agent makes, is spelled out on our security page.)

What I'd actually do

If you do nothing else, do 1 and 2. A shared instructions file plus "agent, write down what we decided" in every PR fixes most of the "why is it like this" questions, and it costs nothing.

Add 4 when you've got more than two or three people running agents at once. Reach for a tool like Coagy when you notice you're spending real time asking teammates what their agent did, or redoing work someone else's agent already did.

Try Coagy

Your team's Claude Code, Codex, Gemini CLI and Cursor sessions in one workspace. Free for up to 4 developers.

Start free