---
title: "Session sync"
description: "Session sync copies a coding-agent session from the machine it runs on into a shared workspace as it happens, so another agent or another machine can read and resume it."
canonical: "https://agentdrive.sh/glossary/session-sync"
---
# Session sync

> For the complete documentation index, see [llms.txt](https://agentdrive.sh/llms.txt). Every docs page is also served as markdown at its URL plus `.md`, and the full docs are in one file at [llms-full.txt](https://agentdrive.sh/llms-full.txt).

> Session sync copies a coding-agent session from the machine it runs on into a shared workspace as it happens, so another agent or another machine can read and resume it.

Source: https://agentdrive.sh/glossary/session-sync. Part of the AgentDrive glossary: https://agentdrive.sh/glossary.

Coding agents keep each session on the machine where it ran, in their own format. Session sync uploads it to shared storage in the background while the agent works, usually triggered by session events such as a turn ending or a session closing. Because sync runs as the session goes, the latest state is already there when the agent stops, for example on a usage limit.

## In AgentDrive

Each supported agent runs `adrive hook` on session events, which starts a detached `adrive sync` and exits at once, so it never blocks the agent. The sync redacts the transcript and uploads it to `sessions/<project>/<harness>/<session-id>.md`; turn-end events re-sync at most every two minutes. Sync runs in Claude Code, Codex, OpenCode, Cursor and Antigravity, while Cline, Zed and Continue connect as plain MCP clients without it. Redaction is best-effort, not a security boundary.

## Related terms

- [Transcript adapter](https://agentdrive.sh/glossary/transcript-adapter/index.md): A transcript adapter is code that reads one coding agent's session transcripts from disk and turns each session into a common document of turns, working directory, title and files touched.
- [Handoff brief](https://agentdrive.sh/glossary/handoff-brief/index.md): A handoff brief is the summary of a coding-agent session that AgentDrive gives the next agent: the goal, the files touched and the most recent turns, sized to a character budget.
- [Private Workspace](https://agentdrive.sh/glossary/private-workspace/index.md): Private Workspace is an AgentDrive setting that makes the `adrive` CLI encrypt the session transcripts and files it syncs on your machine with AES-256-GCM before upload. MCP writes are not encrypted.

## Go deeper

- [How background session sync works](https://agentdrive.sh/blog/how-background-session-sync-works)
- [Sessions](https://agentdrive.sh/docs/concepts/sessions)
- [Integrations](https://agentdrive.sh/integrations)

