CLI: Coding Agents & Memoryco handoff
DocsCLIco handoff

co handoff

Hand your Codex or Claude Code session to a teammate's agent: every message you wrote, the AI's replies, and where the code is. Redacted first, encrypted on your machine, sent only on your yes.

Tell your agent: “Hand this to Bob.” Bob pastes one line into his own Codex or Claude Code, and it picks up where you stopped.

Quick Start

code
# the skill, for Codex, Claude Code and the other agents npx skills supports npx skills add openonion/handoff # the co CLI it runs (1.9.3rc5 or later encrypts handoffs) pip install --upgrade --pre connectonion

Then, in the session you want to hand off, say “hand this to bob@example.com”. Your agent writes the handoff, shows you exactly what will leave, and sends it only when you say yes.

What Bob gets

  1. A short note from you, from your own Gmail or Outlook when you've connected one, with a link to the handoff and one line to copy.
  2. He pastes the line into a new Codex or Claude Code conversation, in the folder where he wants the code. His agent installs co if it's missing, accepts, and reads your conversation.
  3. When something isn't in the session, his agent asks yours, and yours answers from the session. Decisions only you can make come to you.
  4. When it's done, his agent sends the result back, a patch included, and you see it in co handoff status.

Bob needs no account and no setup first: Codex or Claude Code, and network for the one install.

What leaves your machine

  • Nothing goes until you approve. You see the exact text in the preview first.
  • Private sentences come out first, by your own agent. Your Codex or Claude Code reads every sentence and replaces each one about health, family, money, visas or someone else's affairs with [removed: why]. The preview lists where; you can put any back.
  • Secrets stop the send. Anything credential-shaped, and the values of your secret environment variables.
  • Other people stay out. Their email addresses, phone numbers and IPs are masked, and so are the names in your co rem notebook.
  • Only the conversation goes. The commands your agent ran, and their output, stay on your machine.
  • You can take it back. co handoff withdraw <id> removes the page and the pickup.

Encrypted on your machine

co seals the handoff before it leaves your machine (AES-256-GCM, a fresh key for each one). The key travels only in the link you send, after the #, which a browser never sends to a server. ConnectOnion's server stores ciphertext it can't read; the handoff page decrypts in Bob's browser, and co handoff accept decrypts on his machine.

Once his agent accepts, every message between your two agents is end-to-end encrypted to each agent's own key: questions, answers, results and their files.

Where the key goes

The note to Bob is ordinary mail and carries the link. Sent from your own Gmail or Outlook, the key never touches us. With neither connected, the note goes from your agent's mailbox, through ConnectOnion's mail service, and the preview says so.

Commands

Sending

Terminalbash
$co handoff send bob@example.com "the slugify rules"
$co handoff send bob@example.com --draft ho-1a2b3c4d --yes
$co handoff status ho-1a2b3c4d --wait
$co handoff answer ho-1a2b3c4d "30 days, sliding"
$co handoff withdraw ho-1a2b3c4d

send only previews; --draft <id> --yes sends exactly the previewed draft. --since <N> starts at message N, --edit changes the draft first, --lang en|zh picks the language of the report and the note. status --wait returns when they accept, ask or finish.

Receiving

Terminalbash
$co handoff accept "https://o.openonion.ai/h/<id>/codex#k=<key>"
$co handoff ask <code> "Per folder or global?"
$co handoff done <code> "Numbered per parent folder" --file result.patch

The pasted line has the agent run these itself. accept takes the whole link, #k= part included, or the code it prints.

Questions

Which agents work?

Send from a Codex, Claude Code, Gemini CLI, opencode, droid, Cursor or Grok session. Bob receives in Codex or Claude Code.

What if Bob is offline?

The handoff waits for him. One nobody accepts expires after a week; once accepted it's kept for 30 days.

Can I send one session to several people?

Send one handoff each. The first agent to accept a handoff holds it; anyone else with a forwarded link is told it's taken.

The skill and its README: github.com/openonion/handoff. Every detail of the format, the code and the transport is in the markdown copy of this page.