In last week’s post we made an observation about local AI coding sessions: they live on your disk and die with your machine. Your conversation history, the path you took to a solution, the three alternatives you abandoned along the way — all of it is trapped in local files on one laptop.
Today we’re shipping the fix. Cloud Session Sync connects local Claude Code to Forge’s cloud, turning every turn of every session into an immutable, git-backed snapshot you can inspect, branch, continue in the cloud, and resume from any machine.
The shortest way to say it: git for your AI conversations.
The mental model: sessions, branches, snapshots
Three nested concepts, straight from the design doc:
- Session — the long-lived thread tied to a workspace (one git repository). One session per task you’re working on.
- Branch — a linear chain of snapshots inside a session. When you roll back and continue differently, a new branch is created.
- Snapshot — the immutable record of one turn’s effects: the message log up to that point, the workspace state (as a git commit), tool I/O, model parameters, cost. Append-only.
If that sounds git-shaped, that’s deliberate. Workspace state is stored as commits on dedicated forge/session/… branches, so every snapshot is reviewable in any git tool you already use, diffs and merges already exist, and the session tree is just git log --all --graph away. Conversation logs live alongside in encrypted object storage, content-addressed and deduplicated.
What you can do with it
Every turn is captured — automatically
Run forge link once. It authenticates your device (browser approval, a 90-day refreshable device token) and installs lightweight hooks into Claude Code. From then on, every local turn — prompt, response, tool calls, current commit SHA, token cost — syncs to your org’s session history in the background.
The hooks follow one hard rule: Claude Code must never block on the hook. Capture happens in the background with a strict timeout; if your network drops, payloads queue locally and drain automatically with backoff when you’re back online. Offline-first, no babysitting.
Continue in the cloud with one click
Open the session tree in the Forge UI, pick any snapshot, type a prompt, hit send. The turn executes server-side in a sandbox: the worker clones your repo at that snapshot’s commit, replays the conversation, runs the turn, commits the result, and records a new snapshot. Output streams to the UI live.
Kick off a heavy refactor from your phone-sized browser tab, watch it stream, and pick the result up locally later. Your laptop doesn’t have to be the runtime anymore.
Time travel and branch
Because snapshots are immutable and append-only, “undo” finally means something in an AI session. Pick any prior snapshot and continue down a different path — Forge creates a new branch, both paths stay in history, and nothing is destroyed. Compare the two attempts as a plain git diff. Merge or cherry-pick across them whenever you want.
This is the same event-sourced philosophy as our LLMOS runtime : keep the full history, and exploration becomes cheap.
Resume anywhere
| |
Forge downloads the session tree, checks out the session branch, stitches the cloud turns into a local transcript, and Claude Code picks up exactly where the session left off — full conversation context, correct workspace state. Cloud turns that happen while you’re away are stitched in automatically the next time you start; the sync is bidirectional and continuous.
The loop, end to end
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;What about my data?
Session transcripts can contain anything you pasted into them, so we treated storage as a security problem from day one: encrypted in transit everywhere, encrypted at rest, with a per-organization KMS key — so when an org requests deletion, destroying the key makes every blob unreadable. Retention defaults to 30 days for archived sessions and is configurable per org. forge session forget <id> exists for targeted deletion. And 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
Cloud turns often need credentials — a deploy key, a database URL, an API token. Our threat model is blunt about it: the LLM agent is treated as the most untrusted component in the request path — anything it can name in plaintext, it can echo into a transcript, a commit body, or a chat completion. So we designed for the leak. Secrets live encrypted per-org and are exposed to agents only through scoped MCP tools: secret_list returns metadata, never values; access is allowlisted per character; 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 (alias plus a salted hash — never the value), and an output scanner watches for credential-shaped strings trying to leave. The sessions you sync are conversations, not key material.
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:
| |
Then open the Sessions view in your Forge dashboard: your session appears with live turn-by-turn updates, and every snapshot is a point you can branch from or continue in the cloud. If you’d rather sync explicitly than via hooks, forge sync pushes the current local session state up in one shot — the “I’m done locally, hand off to cloud” move.
One practical note: a cloud turn sees your repo at the snapshot’s commit, so commit (and push) what you want the cloud worker to build on.
What’s next
The snapshot tree is the foundation for what comes after: tighter mid-turn interactivity with running cloud turns, and live shared sessions for pair-style work are both on the roadmap. And this composes with everything else Forge does — the same session machinery that backs your solo Claude Code work also backs workflow runs, with the same audit trail underneath.
One more thing, in the spirit of building in the open
: the hero image on this post was generated through our own AI Gateway — the same generic /v1/generations API Forge agents use. You ask for an image; the gateway picks the provider behind one consistent auth and storage layer (Gemini today, swappable tomorrow — that’s the point of a gateway). We dogfood the whole stack.
Cloud Session Sync is rolling out now. If your AI sessions are worth keeping, stop keeping them on one laptop — try Forge or write to us at [email protected] .