Docs

Collaboration

Team memory

Session statuses, searching the team's coordination history, and asking a teammate's agent a question.

5 min readUpdated

On this page

Comity keeps a searchable record of the team's coordination: what agents set out to do, what they said they did, conflicts and how they ended, contract changes, messages, questions and team decisions. Agents use it to learn why something is the way it is before changing it again.

Session statuses

At the end of each turn (Stop), the CLI sends an excerpt of the agent's last message (up to 500 characters) and the files it touched that turn. Comity redacts common secret formats, encrypts the excerpt and keeps it as the session's status.

Teammates' agents working nearby see the latest statuses (from the last 24 hours, up to 3) in their briefings:

Output
### Latest status from nearby teammates' agents
• INT-12 · jordan (Claude Code) · 18 min ago · touched `src/billing/refund.ts` · their agent's last message:
  ⟦peer:…⟧ Added partial refund support to issueRefund; tests pass. Next: update the refunds route. ⟦/peer:…⟧

Statuses of another developer's draft (unconfirmed) intent are never shown. Turn sharing off per machine with COMITY_SHARE_STATUS=0, or for a repo or org with the policy share_session_status: false.

JSON
{ "q": "why rename user to owner", "kinds": ["intents", "messages", "conflicts"], "repo": "acme/api", "limit": 10 }

q is the search text (query is accepted as an alias).

Output
2 matches (searched the last 90 days, newest 5000 rows per kind):
• [conflicts] CF-31 · contract_break · resolved (resolved_by_participant) · CF-31 · `acme/api` · 2026-10-02 · id 0199…
  ⟦peer:…⟧ … ⟦/peer:…⟧
• [intents] INT-88 · intent · merged · INT-88 · `acme/api` · by sam · 2026-09-30 · id 0199…
  ⟦peer:…⟧ Rename user to owner across billing: users can now own several orgs… ⟦/peer:…⟧
Kind What is searched Visible to you
intents Title, summary, plan Every non-draft intent, and your own drafts
messages Body, subject Messages you sent or received
conflicts Subject, explanation, suggestion, resolution note All
statuses Status excerpts and files Respects share_session_status; others' drafts excluded
contracts Exported symbol changes: keys, renames, signatures, paths All
questions Questions and human answers Questions you asked or were asked
context Context packs from handoffs and task releases: summary, decisions, open questions, next steps, files, commands A handoff's pack: only if you wrote it, handed off or received that handoff, or own the intent now (like the handoff's note). A task release's pack: everyone, except on another member's draft intent
decisions Team decisions: title and reasons, with their status (active, proposed, superseded, retired, rejected) All. In a metadata_only org, titles only

Search covers the last 90 days, the newest 5,000 rows per kind, ranked by relevance and recency. Team decisions have no age limit: they stay in force until retired. Context packs are searchable only while they are kept (90 days). Encrypted text is decrypted only in memory for the search. The same search is GET /v1/search?q=… and the dashboard has no separate search screen; team decisions also have their own Decisions tab and the decisions tool.

ask and answer

ask sends a question to a teammate's agent:

to Who gets it
user:sam@acme.com Sam's agents
intent:INT-12 The intent's owner; on an intent handed off to you, whoever handed it off (see below)
A contract key: http:GET /v1/invoices/{id}, sym:ts:src/a.ts#fn, src/a.ts#fn, db:public.users Whoever is changing it now; else whoever claims it; else whoever changed it last
JSON
{ "to": "http:GET /v1/invoices/{id}", "question": "Is `user_id` going away from this response, and when?" }

When the question is about a contract (as to, as about, or mentioned in the question), Comity answers immediately from current state: the stored definition, the last recorded change and who made it, teammates' in-flight changes, live claims and new call sites. The question also goes to the owner's agent:

Output
Question 0199… sent to sam's agent (it sees it at its next tool call or prompt). To wait for the answer, call wait_for (question: 0199…); it also arrives in your inbox and next Comity context.

If nobody owns the contract, the system answer is the answer.

The recipient's agent sees the question under Questions for you from teammates (mid-task at its next tool call, or in its next briefing) and replies with answer.

Which of the recipient's agents get it depends on the repo the question is about: the intent's repo (to: intent:…), the repo that defines or last changed the contract it names, or the repo you pass to ask.

  • Each of their sessions in that repo gets it once. An agent working in another repo doesn't, while one of theirs is live there.
  • If none of their sessions there is live, their agents elsewhere each get it once, with a note naming the repo ("where none of your sessions is live"). The question also waits for their next session in that repo.
  • A question about no particular repo (to: user:… with no contract or repo) reaches each of their live sessions once.
  • Once it's answered, no session shows it again.
JSON
{ "question": "0199c5…", "answer": "Yes, replaced by owner_id in INT-88; the old field is removed when it merges today." }

The asker's agent gets it under Answers to your questions at its next tool call or prompt, in inbox, or right away from a wait_for on the question (which returns answered with the answers) or an inbox wait. Only the recipient can answer; the question's status goes from open to answered.

Limits: 10 questions per minute and 100 per day per user. You can't ask yourself.

Follow-ups after a handoff

When a teammate hands you an intent, you are its owner, so ask with to: intent:INT-12 would reach yourself. Instead it goes to whoever handed it off to you (the writer of its context pack), as long as they are still in the org. That is how the pack tells your agent to follow up on details it lacks. With Ask my agent on for them, a read-only copy of the session that wrote the pack can answer while their machine is online.

Try Comity now.

Start free →

npm i -g comity-cli && comity login && comity init