How it works: When a turn ends

How it works

When a turn ends

Once auto-sync is on, each conversation is sent to the server when your coding agent finishes a turn. This page follows one conversation from a turn on one computer to the next turn on another.

Your computerCesar's serverYour other computer1A turn endsyouDeploy with this token:ghp_x7Kq2m…9fTzagentDeployed. 3 services are up.Secrets are taken outyouDeploy with this token:[REDACTED:github-token]agentDeployed. 3 services are up.Sealed conversationtext, title, folder, agentWhat it seessizes and content hashestimesthe names of your devicesWhat it cannot readthe textthe title and the folderwhich agent it came fromA push is refused when the serverholds a newer version: pull first.Stored as it camea new versionPulled and openedcesar pull 1a2b3c4d --into ~/code/appopened with your own keysMade to fit this computerits paths now point to ~/code/appit is filed where your agent looksa copy it replaces goes to ~/.cesar/backupsYou carry onclaude --resume 1a2b3c4d-…the same conversation, mid-thought,on the other computer2the hook starts a sync3sealed with its own key4pushed5pulled6paths rewritten7resumed
One conversation, from a laptop to another computer. The secret in it is replaced before anything is sealed, so it never leaves the laptop.
  1. A turn ends. Your coding agent has answered. The conversation is a file on your disk.
  2. The hook starts a sync. It leaves a note and returns at once. The sync runs in the background.
  3. Secrets are removed, then the conversation is sealed. Anything that looks like a secret is replaced by a marker. The result is compressed and sealed with a key of its own.
  4. It is sent. The server stores it as a new version. A conversation synced for the first time goes to your personal workspace.
  5. Your other computer fetches it. With cesar pull, signed in with the same GitHub account and passphrase.
  6. Its paths are rewritten. A conversation remembers the folder it ran in. Every path under that folder is changed to the folder you pull into.
  7. You resume it. The file is where the agent looks for it, so claude --resume or codex resume finds it.

The hook

The hook leaves a note and starts the sync. It returns at once and always reports success, so it never slows your agent down. With no network, the conversation waits and is sent at the next sync.

cesar status shows what is waiting and what failed, with the reason. While a sync runs, it also says what the sync is doing. The full record is in ~/.cesar/cesar.log.

What a sync did that concerns you is shown in your coding agent, once, at the end of your next turn: a block written, blocks folded into your pages, a fold that failed, a teammate waiting to be let in.

What is removed before syncing

Each of these is replaced by [REDACTED:kind] on your computer, before the conversation is sealed:

  • private keys, AWS keys, GitHub tokens, Google API keys;
  • API keys that start with sk-, and JWTs;
  • long values that follow a name such as token, api_key, secret or password.

The file on your disk is not changed: only the copy that leaves is cleaned. This works from known patterns, so a secret in an unknown shape gets through. Treat it as a safety net.

What the server sees

Sizes, content hashes, times and the names of your computers. That is how it reports which computer is up to date.

It does not see the text of a conversation, its title, the folder it ran in or which agent it came from. All of that is inside the sealed file.

When two computers changed the same conversation

A push is refused when the server already has a newer version. Pull first. If this computer has changes too, cesar pull --force replaces them and keeps a copy in ~/.cesar/backups.

cesar pull 1a2b3c4d --into ~/code/myrepo
cesar pull 1a2b3c4d --into ~/code/myrepo --force   # replace what is here, keep a backup

Supported agents

AgentSynced after each turnResumed after a pull
Claude Codeyesclaude --resume <id>
Codexyescodex resume <id>
Cursoryesno: read it with cesar show <id>

cesar show prints any conversation, from any agent, on any computer you are signed in on.

Good to know

  • Close the conversation in your agent before you pull it. A pull replaces the file, and a session left open keeps writing to the old one.
  • A computer keeps one copy of a conversation. Pulling it into another folder moves the older copy to the backups.
  • The transcripts of subagents are not synced. Resuming does not need them.
  • To sync only the conversations you choose, see Sync only what you choose.