Griddler docs

The agent and its relay

What Deploy does, how a pane on your screen reaches a session on the agent, how the terminal is encrypted, and how sharing is enforced.

A Griddler Agent is a container that runs your Claude Code and Codex sessions somewhere other than your PC. This page is the mechanics behind that page.

What's in the container

  • tmux, which holds every session as a window, so a session outlives whoever is looking at it.
  • Claude Code and Codex, signed in as you: Claude Code with your saved setup token when you have one, otherwise a copy of your sign-in, and Codex with a copy of its sign-in.
  • The agent, a small program that starts and stops sessions, reports their state and what your loops are doing, and carries their terminals, encrypted, to Griddler Social.
  • Tools for your sessions: git, uv and the Azure CLI with its SSH extension. npm and npx aren't included, and Claude Code and Codex don't update themselves: each image carries the versions built with that Griddler.
  • Your repositories, mounted from the machine it runs on: your home folder on a dev VM, or the folder that holds your checkouts (like C:\Source, seen as /src) on Docker Desktop.
  • A volume for the agent's own home: sign-ins, settings, session history, and anything a session saves there, such as an Azure CLI sign-in. It survives upgrades and Remove.

What Deploy does

Check the machine

Over SSH for a dev VM, or through Docker Desktop locally: is docker there, is it a headless machine, and which VM is it.

Enrol

Griddler registers the agent with Griddler Social under your name and gets the agent its own token. Social stores only a hash of that token.

Griddler also makes the agent an encryption key pair. The agent gets the private half; this PC keeps the public half, to check the agent with later. Social never sees the private half.

Get the image

An installed Griddler asks Social for a short-lived pass to River Logic's container registry, and the machine pulls the agent image that matches your version of Griddler. The pass is used once and never stored.

Copy your sign-ins

Your sign-ins and settings go into the volume; What the agent gets from you lists them. A copied Claude Code sign-in, rather than a setup token, is shared with your PC, so either one can sign the other out.

Start

The container starts, set to restart on its own. Within a few seconds it reports in, and the card turns online.

How a pane reaches a session

The agent never listens for connections. It opens one outbound connection to Griddler Social and keeps it open. Your Griddler opens its own connection to Social for each agent pane. Social joins the two.

These connections use a relay address of their own, beside the website's, because the web proxy in front of the site cut long-lived connections. A network that blocks the relay address falls back to the site's own address, and the fallback is temporary:

  • When the agent's connection drops, it tries the relay address first again, even if it was on the fallback.
  • Once your Griddler falls back, it opens new panes on the fallback first for 10 minutes, then goes back to trying the relay address first.

If the agent's connection drops and comes back, Social moves the open panes onto the new one. In the admin portal, admins see which address each agent is on: direct for the relay address, cloudflare for the site's own.

The relay: the agent's one outbound connection and each viewer's connection meet at Griddler Social, which checks sharing and passes the encrypted terminal throughGriddler Agentyour sign-intheir sign-inthe agent's tokenone private viewper paneYour Griddlerowner ยท drivesA teammate's Griddlerwatches or drivesThe agentone outbound connectiontmuxyour Claude Code and Codex sessions

When you open an agent pane:

  1. Your Griddler asks Social for that session, with your sign-in.
  2. Social checks that the agent is yours, or that its Sharing covers you, and in which mode.
  3. Social tells the agent to open a view. The agent gives that view its own private tmux session holding only that one window, so no keystroke can reach another session or a shell.
  4. Your Griddler and the agent agree on keys for this one view, through Social (see below).
  5. From then on, bytes flow both ways through Social, encrypted. Social drops a watcher's typing before it reaches the agent, and the agent ignores it too.

Closing the pane closes that view. The session itself keeps running in tmux.

End-to-end encryption

Each view has its own keys, so Social, and anything between you and Social, carries only ciphertext.

  • Keys. Each pane makes a fresh key pair when it opens, and the agent makes a fresh one for each view. Both ends combine those with the agent's own key from Deploy (X25519, then HKDF-SHA256) into one AES-256-GCM key for each direction. Only the real agent holds the private half of its key, so only it can finish the exchange.
  • Pinning. The PC that deployed the agent checks that the agent answers with the key it made at Deploy. On any other key, no answer, or unencrypted output, Griddler refuses the relay and connects directly instead (below). Other PCs and teammates have no key to compare with: their panes are encrypted, but they can't tell the real agent from something in the middle.
  • Every frame is numbered. A frame that's changed, cut short, replayed or out of order fails its check. On the agent it's dropped and never typed. On your PC it closes the pane.
  • New keys after a reconnect. When the agent reconnects, each open view agrees on fresh keys.
  • What stays readable. Social still routes each view: it sees which session, the window size, when the view opened and closed, and how much went each way. It never sees what was typed or shown.

An agent deployed from a Griddler older than 0.1.55539, or a pane opened from one, sends plaintext. Both ends note it in their logs.

Sharing, enforced by Social

Social decides who gets in from the agent's Sharing on every connection, and again whenever it changes: narrowing it disconnects the people it no longer covers, with the reason.

The agent's token can only do agent things: report in, pick up work, and carry terminals. It can't enrol, change sharing, read anyone's mail, or fetch images.

What's recorded

  • Social records who opened which session, when, for how long, whether they watched or drove, how much went each way, whether it was encrypted, and why it ended.
  • It can't record what was typed or shown. Social keeps no scrollback; a new viewer sees the session's current screen because tmux redraws it.
  • The agent's reports carry each session's state, folder, title and its last few lines, for the card and the attention colors. On a dev VM they also carry your loops' and research runs' status and your agent definitions' names and descriptions; see the agent page.

When Social isn't there

If the relay is down, or the agent fails the key check, the PC that deployed the agent can still reach it directly, over SSH or docker, and Griddler uses that for its own panes. Teammates can't: sharing only works through Social.

Limits

  • The connections send a keep-alive every 30 seconds, so an idle pane stays connected. Social closes a connection that's sent nothing for 100 seconds.
  • A view with no keystroke for a day is closed on the agent. The viewer and pane counts are on the agent page.

On this page