How it works
Three nested concepts: a session (the long-lived thread tied to one git repository), its branches (linear chains of snapshots — roll back and continue differently, and a new branch is born), and snapshots (the immutable record of one turn: message log, workspace state as a git commit, tool I/O, model parameters, cost — append-only).
If that sounds git-shaped, that’s deliberate. Workspace state lives as commits on dedicated forge/session/… branches, so every snapshot is reviewable in any git tool, diffs and merges already exist, and the session tree is just git log --all --graph away.
flowchart TD
L[Claude Code · local] -->|every turn: transcript + commit SHA| S[(Forge sessions
snapshots = git commits)]
S -->|"Continue in cloud"| C[Cloud sandbox turn]
C -->|new snapshot, streamed live| S
S -->|pick any snapshot| B[Roll back / branch]
B -->|new branch in the tree| S
S -->|cloud-pull + resume| M[Claude Code · any machine]
M -->|keeps syncing| S
classDef endpoint fill:#0a1a33,stroke:#22d3ee,stroke-width:2px,color:#67e8f9;
class L,M endpoint;Getting started
The forge CLI ships as a single platform binary — same install pattern as sc
, no runtime dependencies. Once it’s on your PATH:
| |
Prefer explicit control over hooks? forge sync pushes the current local session state up in one shot — the “I’m done locally, hand off to cloud” move. And on another machine:
| |
Security model
Transcripts are encrypted in transit and at rest with a per-organization KMS key — destroy the key and every blob is unreadable. Retention is configurable per org; forge session forget <id> exists for targeted deletion. What’s uploaded is explicit: the transcript, the commit SHA, run stats — never your working tree or environment.
And secrets stay out of the transcript entirely. Agents reach credentials only through scoped tools — secret_list returns metadata, never values — and the secure-curl path resolves {{alias}} placeholders at the egress proxy, outside the agent’s address space. The plaintext never enters the agent’s context, so it can’t end up in a synced snapshot either. Every access leaves a plaintext-free audit row.
It composes
The same session machinery backs workflow runs, with the same git-backed audit trail underneath, executed locally or in the cloud via forge-cli . Read the launch post: Introducing Cloud Session Sync .