Skip to content

Run an agent with cairn run ​

cairn run starts a coding agent (Claude Code by default) in a small virtual machine that holds a copy of the folder you ran it in. While the agent works, cairn keeps your folder and the machine's copy in step. You use it when you want an agent to edit your files without giving it your whole computer.

In one minute ​

  • The machine is an ordinary cairn app. Its disk, its installed tools and the agent's saved conversations stay between runs.
  • The agent is treated as untrusted and runs jailed. But a change it makes to your files is a change to your files. Read what it leaves behind, especially scripts, Makefiles, .envrc, package.json, .gitmodules and .gitattributes, before you use them.
  • You never copy files in or out by hand. A two-way sync does it.
  • The agent's work comes back as ordinary file changes in your folder, and you commit them yourself. Git commits it makes stay in the machine.
  • One session per app at a time. For a second shell in the same machine, use cairn exec -it <app>.

A first session ​

From inside your project folder:

sh
export CLAUDE_CODE_OAUTH_TOKEN=...   # or ANTHROPIC_API_KEY; see "Logging in"
cairn run

The first time, cairn builds the machine and copies your folder in. Later runs reuse it. When the agent ends, cairn syncs once more and prints a report. This is a real session (an Alpine image, a shell instead of an agent, ... marks lines left out, paths shortened):

console
$ cairn run --shell
bringing network run-alpine-proj-d99ec5 up
created network run-alpine-proj-d99ec5
getting the image
image 24ab38714e94 (docker.io/library/alpine@sha256:2e0b81d6…), cached
building the root disk
built the template for this image once; later apps clone it
starting the machine
alpine · docker.io/library/alpine:3.22 (image reference) · app run-alpine-proj-d99ec5
synced <folder> → /mnt/host/<folder> in the machine: 1 file to the machine (0.0s)
repository: the image has no git; the machine has your files but not the repository
...
left the shell (exit 0): 1 file came back
the app keeps running; `cairn run --shell` here opens another shell in it

What happened: a network and the machine were built and your folder was copied in; the shell ran; at the end the new file appeared in your folder. This image has no git, so the machine had the files but not the repository. When the image does have git, the machine gets a copy of your repository, brought up to date at the start of every session (see Git). The /mnt/host/... path appears only because that scratch folder lived under /tmp, which cannot be at the same path inside the machine; ordinary folders keep their path.

cairn run --status shows the app, the agent, the folder (in the machine at /mnt/host/<same path>), the machine, the sync state (1 file in step; last sync …, complete), conflicts, the machine's repository and the session, if one is attached. cairn run --rm ends with removed run-alpine-proj-d99ec5 and its network.

Logging in ​

cairn never forwards your host's Claude login file (~/.claude/.credentials.json): two copies of a rotating refresh token would invalidate each other. Instead, do one of:

  • Export CLAUDE_CODE_OAUTH_TOKEN (from claude setup-token) or ANTHROPIC_API_KEY before cairn run. The built-in claude alias forwards both, plus ANTHROPIC_BASE_URL, when each is set and non-empty. Values travel in the session's start frame over vsock. They are never on a command line cairn builds and never in its records; the output only says forwarding NAME.
  • Run /login inside the app. The credentials live on the app's disk and survive sessions; --fresh and --rm remove them. A microVM cannot receive the browser callback, so the login prints a URL to open on the host and a code to paste back.

-e KEY forwards the host's value (refused if unset); -e KEY=VALUE sets one. A later entry wins. Only names you configure are forwarded, so an image cannot ask for more. -e KEY=VALUE puts the value on cairn's own command line, where other local users can see it in ps, so prefer -e KEY.

The everyday commands ​

Run these from inside your project folder.

CommandWhat it does
cairn runStart Claude in this folder's app. Creates the app the first time.
cairn run -- --continueEverything after -- goes to the agent. Here: resume Claude's last conversation.
cairn run -- -p "fix the failing test"Headless: no terminal needed; the agent's exit status comes back.
cairn run --shellA shell in the same app instead of the agent (/bin/sh when there is no terminal).
cairn run codexA different agent, after codex = "ghcr.io/me/codex:1" under [run] (aliases).
cairn run --statusThe app, its image, the sync, the machine's repository and the session.
cairn run --sync-nowSync once and exit.
cairn run --stopSync, then stop the machine. The disk stays.
cairn run --rmSync, bring everything back, then delete the app and its network.
cairn run --freshReplace this folder's app with a new one (same safety recovery as --rm).
cairn run --lsList every cairn run app on this host.

Session options: --sync live|exit|off (syncing), -e KEY[=VALUE], -q for only the agent's output, --json. App options, applied when the app is created (use --fresh to change an existing one): --cpus (1 to 32, default 2), --memory (default 2gb), --balloon on|off, --rootfs-size (default 16gb, thin), --network-mode nat|off. --allow ENTRY,...|any sets what the app may reach (names or a.b.c.d/len; --allow '' allows nothing; --allow any removes the list) and, unlike the other app options, applies at once to an existing app and stays for later sessions. See networking. --pull fetches the image again now; an existing app keeps its own image until --fresh. cairn run --help is the full list.

Each cairn run starts a new agent in the folder's app; the app and its disk stay. Exiting the agent, or leaving with ~., ends the agent and everything that session started. Ctrl+C goes to the agent. cairn keeps no session alive and has no attach: to keep an agent running after the terminal closes, start cairn run inside tmux or screen.

One session at a time ​

An app has at most one cairn run session. A second cairn run in the same folder, agent or --shell, is refused and says how to get another shell:

console
$ cairn run --shell
run-claude-shop-1a2b3c already has a cairn run session (pid 4127, since 12:41Z); for another shell in it: cairn exec -it run-claude-shop-1a2b3c

cairn exec -it <app> opens that shell beside the session. It is not synced by itself: what it changes comes back with the session's next sync. If it is still running when the session ends, the session's final sync cannot vouch for it, so --status keeps saying the folder is unsynced (other sessions were running in the machine when it ended) until a later sync.

--sync-now, --stop, --rm and --fresh are refused the same way while a session is attached, naming its pid; --stop --force interrupts it (see Stopping while a session is attached). When another cairn command is briefly working on the app, a command waits up to ten seconds, saying so after a second, then gives up with another cairn command is working on <app>; try again. Ctrl+C during that wait exits 130 and changes nothing. Times printed here are UTC (12:41Z).

Exit status. The agent's own code passes through unchanged (a sync problem is reported, not folded into it). 128 + N means signal N ended it. 125 means cairn refused or the app could not be made ready (the agent did not run), or, for --sync-now, --stop, --rm and --fresh, that the sync, recovery or cleanup was incomplete. 130 means Ctrl+C: either it ended a wait for the app and nothing was changed, or it stopped an operation part-way, which then says what it left (for example stopped; the machine was left running with its work in it). 255 means you left with ~. or the result is unknown.

Which app am I in? ​

One folder is one app, named run-<agent>-<folder>-<6 hex digits>. The digits are a hash of the agent and the folder's full path, so two folders with the same name never share an app. cairn run --ls lists them all.

If you run cairn run in a subfolder of a Git repository, cairn syncs the whole repository and starts the agent in your subfolder. Outside a repository, each folder (including a subfolder) is its own app.

Agents, aliases and images ​

AGENT is looked up as an alias first, then used as an image reference if it contains / or :. The built-in claude alias is ghcr.io/buildcairn/claude:latest. Your own aliases live in $CAIRN_HOME/providers (usually ~/.cairn/providers). cairn reads exactly one table, [run], and ignores the rest of the file:

toml
[run]
codex = "ghcr.io/me/codex:1"                # short form: the image

[run.agent]                                  # long form: image and defaults
image = "ghcr.io/me/agent:1"
cpus = 4
memory = "4gb"
rootfs_size = "32gb"
network_mode = "nat"
args = ["--full-auto"]                       # before your own -- ARGS
env = ["OPENAI_API_KEY", "GH_TOKEN"]         # forwarded when set on the host

The long-form keys are image, cpus, memory, rootfs_size, network_mode, args and env. A short-form entry for a built-in name replaces the image but keeps the built-in's env; a long-form entry replaces both. An alias's image identity is the repository without tag or digest, so pointing :latest at a new build keeps the same app. --fresh (or a new folder) is what rebuilds it. The session's header line says where the image came from (built-in, [run] in …, or image reference).

An image of your own must meet this contract:

  • The agent is the image's ENTRYPOINT, with CMD as its default arguments. -- ARGS replace CMD, as in docker run IMAGE ARGS. An image with neither is refused for a session (use --shell).
  • sleep infinity works: the app's workload is an idle sleep, not the agent.
  • /bin/sh exists, for --shell without a terminal.
  • A non-root USER has a writable $HOME (a root user works, with a warning).
  • git 2.40 or newer is on PATH if the folder is a repository. Without it the machine gets the files but not the repository, and the session's first lines and --status say so. Nothing else from the image is needed: the sync's guest side is built into cairn's own guest init.

The image labels dev.cairn.run.agent (display name) and dev.cairn.run.env (variable names) are optional hints. A label never authorizes forwarding: the alias's env list, the built-in alias and -e alone decide what is forwarded.

Syncing ​

The sync is three-way: your folder, the machine's copy, and a saved record of what both looked like at the last agreement. With that record cairn can tell which side changed a file.

ModeBehaviour
--sync live (default)A sync every 2 seconds while the session is attached, and once more when the agent ends.
--sync exitOne sync when the session starts and one when it ends.
--sync offNo syncing at all.

A failed live tick is retried and never stops the session by itself. After three consecutive failures of the sync helper (or its protocol), live ticking stops for that session and says why; the final sync still gets one fresh attempt. A Git or scope error is reported in that tick's report but does not count toward the three. While the machine is paused (cairn pause) or stopped, ticks skip and say so once; cairn resume lets the next tick reconcile. Every sync's report, printed after the session and by --sync-now, says what moved in each direction, what was restored or kept, and what was not copied back. Host deletions are named, not silent.

cairn run --sync-now starts the machine if it is stopped, syncs once and exits 0 when complete, 125 when not. While a cairn run session is attached it refuses and names that session's pid: the session is already syncing.

What syncs ​

  • In a Git repository your own ignore rules decide, and only yours: files your repository tracks, plus untracked files your rules do not ignore. A new file the agent makes comes back when your rules do not ignore it. What the machine's repository tracks plays no part, so an agent's git add -f out.log of a file your rules ignore does not bring it back, and the agent cannot make your .env or a key readable, replaceable or deletable from the machine.
  • Outside a repository every regular file and symlink in the folder syncs. A .gitignore there means nothing, and there is no .cairnignore.
  • Only regular files and symlinks cross. Empty directories do not (a file creates its parent directories). FIFOs, sockets and devices are ignored on both sides. Hard links become separate files. File modes are preserved (masked with 0o777) and files land owned by you.
  • Kernel pseudo-filesystems on the host (proc, sysfs, devtmpfs, devpts, cgroups, securityfs, debugfs, tracefs, bpf, fusectl, configfs, mqueue, hugetlbfs, pstore, efivarfs, binfmt_misc, autofs) are not walked and never read as deleted. An ordinary tmpfs inside the folder is your data and is crossed.
  • Nothing under a .git folder crosses, in either direction. The machine's repository is built and refreshed separately, and its history never comes back (Git). Git config files, hooks and other control inputs in your folder (an include destination, a filter or program path) go to the machine but never come back.
  • A .gitignore never comes back either, at any depth, nor an excludes file configured as core.excludesFile, nor Git's default one ($XDG_CONFIG_HOME/git/ignore, else $HOME/.config/git/ignore), including when reached through in-folder symlinks. The machine may change its own copy; your rules, and so what the machine may see, are never taken from it. Such a change is kept in the machine and reported (not copied back: .gitignore …). If the machine deletes one of these files, or a control input, the next sync puts your version back there (restored in the machine: .gitignore (your rules are the only ones the sync uses)), so the two sides do not stay apart. A ~/ in your Git configuration means your $HOME, as it does to Git, not $CAIRN_HOME.
  • $CAIRN_HOME is never synced in either direction, even if the folder contains it.
  • The folder must support renameat2 with RENAME_EXCHANGE and RENAME_NOREPLACE on every filesystem a transaction touches. If it does not, the first sync refuses and names the filesystem; cairn run --sync off still runs the agent.

Ignore rules are not a secrecy boundary. They decide what syncs; they do not encrypt, and they do not withdraw a file the machine already has. A file that has ever synced stays readable by the agent for the life of the app's disk, and adding a rule later does not remove that copy (--fresh rebuilds the disk). Keep secrets in a folder the agent does not get, not behind a pattern.

When both sides change the same file ​

Neither version is lost. Yours stays at its name; the machine's becomes <name>.vm-conflict (or .vm-conflict-2, -3, … if those names are taken). The next tick brings your version to the machine. Example, with --sync exit and both sides rewriting a.txt:

console
1 conflict: kept your version; the machine's is beside it as a.txt.vm-conflict
$ cat a.txt a.txt.vm-conflict
host-edit
machine-edit

--status and the after-session report list conflicts (conflicts 1: a.txt.vm-conflict). Merge by hand and delete the .vm-conflict file; it is an ordinary untracked file, so remove it before you commit. Only conflicts cairn recorded are listed: a file you name notes.vm-conflict yourself is an ordinary file.

A narrower race happens on the machine's side: the agent rewrites a file in the very moment the sync is writing your version of it there. The machine keeps the agent's version, and the other one is put beside it in the machine. The report says whose version that is:

  • x changed in the machine while your version was being written; the machine kept its own, and your version is beside it there as x.vm-conflict, or
  • the machine's earlier version of x is beside it there as x.vm-conflict.

That file then comes to your folder at the next tick like any new file, and the next tick plans the real conflict for x. Nothing is lost, but the names can stack up: when a later conflict keeps the machine's copy of that file, the report calls it "the machine's" version even when it holds your earlier one, as every conflict line does (for example x.vm-conflict.vm-conflict). Compare the files' contents, not their names.

Two exceptions:

  • Protected paths. For a path under .git, or a Git control input, cairn must not create a conflict artifact on the host. Both versions simply stay where they are and the tick is reported incomplete. Merge those by hand.
  • Ignore files. When both sides changed a .gitignore or excludes file, your version wins and is pushed to the machine; the machine's version is not kept anywhere. An agent therefore cannot widen the sync's scope by editing the rules.

Deleting many files at once ​

If one sync would delete more than 100 files, or more than 25% of the synced files (and more than 10), the host-side deletions are held back, reported and recorded. Everything else still syncs, and nothing applies them later on its own. When you have checked the list:

sh
cairn run --sync-now --sync-deletions

This re-checks each held path and deletes only those that are still safe to delete. A file the machine writes where a held deletion stands (the machine replaced your file a with a directory holding a/x) waits with it, and the report and --status say so (a/x waits for the held deletion of a); --sync-deletions applies both.

Replaced and deleted files are kept briefly ​

A replaced or deleted file stays under a temporary name (.cairn-sync, .cairn-del) for at least the next tick (two seconds) and through the final sync, so a program holding it open can finish writing. If it changed in that window it becomes a conflict artifact instead of being discarded. After the window, an old descriptor writes to an unlinked file and those bytes are not recovered. The session's last sync waits out the window once and retires what is left, so no temporary names stay in your folder. --rm --discard and cairn destroy <app> --discard retire them too.

After the machine dies uncleanly ​

If Firecracker is killed or the host loses power, the next sync does not trust the last agreement: the guest disk may have rolled back behind what your side already took. cairn drops the file baseline, says so once, and reseeds. A file only the host has is pushed back to the machine rather than read as a machine deletion, and a file the two sides differ on becomes a conflict with both versions kept. Recorded conflicts are kept. That first sync can move more files than usual and produce conflicts; this is the repair, not data loss. A clean ending (the agent exited, or the app was stopped) does not trigger it.

Git ​

The agent's work comes back to you as files, never as Git history. You review the changes in your folder with your own tools and commit them yourself.

The machine's repository ​

When your folder is a Git repository and the image has git, the machine gets its own copy of your repository. At the start of every session, before the agent runs, cairn brings it up to date with yours:

  • your branches and tags replace the machine's branches and tags of the same names, and the machine's HEAD becomes yours;
  • the machine's index is reset to its new HEAD; its working files are left alone (they are the synced files);
  • a branch or tag you deleted is deleted there too; a branch only the machine has is kept, and a tip your refresh replaced stays in the machine's reflog.

So at the start of a session git status and git log in the machine show what they show on your side. The session's first lines, and --status afterwards, say how that went:

LineMeaning
repository: the machine has yours (HEAD 4e1a2c0 on main)The machine's repository was made from yours.
repository: the machine's matches yours (HEAD 4e1a2c0 on main)It was brought up to date. --status says the machine's matched yours at 12:41Z (…).
repository: not refreshed, the machine's is in the middle of a merge (MERGE_HEAD); finish or abort it there (cairn run --shell)Nothing was changed there; the same for a rebase, cherry-pick, revert or bisect.
repository: not refreshed, git is running in the machine or was stopped there (.git/index.lock); if nothing is running, remove it in cairn run --shellA Git lock file in the machine.
repository: the machine has a repository at … that cairn did not make; cairn run --fresh replaces the machineThe agent replaced the repository; cairn leaves it alone.
repository: the image has no git; the machine has your files but not the repositoryThe image has no git.
repository: the machine's git is 2.39.5, older than 2.40; it has your files but not the repositoryThe image's git is too old.
repository: the machine's repository was not refreshed: …Any other reason, named (for example a partial clone, below).
repo not refreshed yet (--status only)No session has refreshed it since the app was made.

A refresh that does not happen never stops the session: the files still sync.

What that means day to day ​

  • Commits made in the machine stay in the machine. Their changes reach you as files; the commits do not. --rm and --fresh bring back the machine's files, not its history, so a commit whose changes the agent later undid in its working files is lost with the disk.
  • Your commits reach the machine at the next session's start. During a session they arrive as file changes, as everything else does.
  • Your staged changes are not mirrored. The machine's index is its HEAD, so what you staged shows there as unstaged.
  • A partial clone cannot be mirrored (git would have to fetch missing objects): the files sync and the machine gets no repository, with a note. A shallow clone works; if you deepen it later, the machine keeps its shallower history until --fresh.

Submodules ​

An initialized submodule's files sync like the rest (found from your own index, never from .gitmodules), but the machine has no repository there: git in the machine does not see the agent's edits in it, though they still come back as files. --status lists each one (submodule 'lib': files sync; the machine has no repository there). Uninitialized submodules, and repositories nothing tracks (yours or one the machine made), are not synced in either direction and are listed. A directory with a fake .git is treated as an ordinary directory; one that cannot be told is left alone and reported.

Git worktrees ​

A worktree is an extra folder attached to the same repository and checked out on a different branch (git worktree add ../myproject-feature -b feature). cairn treats each worktree folder as its own app, with its own machine and its own copy of the repository, so you can run one agent per task while you keep working in the other folder. cairn run --ls lists both.

Which git and other tools cairn runs ​

cairn run picks the git on your PATH once, when the session starts, and runs that file for everything it does with Git on your side (listing what syncs, and packing your repository's objects for the machine; it never reads the machine's repository), with the folder's own directories removed from the PATH it hands on. A program the machine syncs into a directory on your PATH therefore never runs on your side. If the name reaches the folder through a link at any step, cairn runs the real file it resolves to. If the selected git's real file is itself inside the folder, cairn run refuses before syncing and says so (put a git outside the folder first on PATH, or use --sync off); a link in the folder to a git elsewhere is fine. The same applies to every other program cairn run starts on your side (podman, unshare, mkfs.ext4, systemctl, and so on). When no safe directory is left, cairn says the tool is unavailable and stops rather than searching the working directory.

Finishing up ​

sh
cairn run --status      # anything held back? conflicts? still unsynced?
cairn run --stop        # sync, stop the machine, keep the disk
cairn run --rm          # sync, recover, delete the app and its network

--stop syncs and stops the machine. The disk and the agent's state stay, and the next cairn run starts it again. If the folder has apps for several agents, name one: cairn run <agent> --stop.

--rm and --fresh: recovering before the disk goes ​

--rm and --fresh delete the app's disk, so first they sync (the machine's changes come back and the report is printed) and then run a one-way recovery of files from the machine to your host: every file the machine has that differs from what your side last agreed with comes back, either at its name or, where you changed the same file, beside it as a conflict artifact. If anything cannot be saved, the command refuses and says what. --discard goes ahead anyway. --fresh then rebuilds the app from the image; --fresh --pull fetches the image again. The app's network is removed with the app by --rm and --fresh. --rm on a stopped app starts it just long enough to bring changes back.

Recovery brings back files, not Git history: the machine's commits, branches and stash are lost with the disk. Commit what you want to keep on your side first; the machine's changes are already in your folder.

It refuses (and names the path) when:

  • the machine's folder could not be listed completely, or a file could not be read reliably;
  • a path in the machine may be a Git repository and cannot be told;
  • the host's path is a .git or Git-control path, so cairn cannot keep the machine's version there;
  • a write the machine's sync journal holds (an interrupted or kept write) could not be kept;
  • other sessions' processes (a cairn exec) are still running in the machine;
  • the machine was made by a different cairn version (…made by a different cairn version and cannot sync; cairn run --fresh replaces it …). --discard is the way out. Such a machine cannot sync either, while --sync off still runs the agent.

A machine-side .gitignore change is skipped by recovery rather than making it refuse: yours is the copy that matters.

What is lost even when recovery succeeds: the machine's Git history, untracked files your rules ignore (they were never in sync scope), and anything written after recovery's last check. That check runs under the sync lock and requires that no other session's processes are running in the machine; then it recovers and destroys. There is one narrow window: a new cairn exec started in the milliseconds between that check and the destroy could write a file that is then destroyed. Do not start one while --rm or --fresh is recovering.

Stopping while a session is attached ​

cairn run --stop --force, or cairn stop <app> --force, interrupts the attached session. It prints stopping cairn run (pid 4127)… and sends the session SIGTERM, which reaches the agent and starts the session's final sync. A session that has not ended within five seconds is killed, and a second line says its final sync was cut short. The signals go only to the session process cairn recorded and checked: if that pid now belongs to another process, nothing is signalled, and the stop waits, then refuses, naming the lock file. The machine is then synced (a failure is a warning with --force) and stopped. Its disk is kept, and work that did not sync reads as unsynced until a sync succeeds. --force never deletes work, and --discard never ends a session. cairn destroy refuses while a session is attached, with or without --discard, and takes no --force. To end the session and delete the work, ask for each by name: cairn stop <app> --force, then cairn destroy <app> --discard.

While a run app's machine is paused, its session starts no sync (the guest cannot answer) and keeps the folder marked unsynced; cairn resume lets the next tick reconcile.

When is the folder in step? ​

From the moment a session's agent starts, cairn records the folder as unsynced: the agent may be changing the machine. Only a complete sync that also finds no other session running in the machine (a cairn exec) clears it: the session's final sync, --sync-now, or the sync before --stop, --rm or --fresh. Until then cairn run --status says the sync state is unknown now, since when, and why:

console
sync      1,247 files in step as of the last sync; unknown now: a session may have changed the machine since 12:30Z (last sync 12:41:07Z, complete); `cairn run --sync-now` brings it in step
session   the last session ended without finishing (pid 4127, attached)

The second line appears when a session's supervisor died (killed, or the host lost power) before it finished; the next cairn run or run command takes over normally. While a run command or cairn stop/cairn destroy holds the app, the line says so instead: session a cairn command is working on it (cairn stop, pid 4127). A session with --sync off leaves the folder unsynced too, and an attached one shows as session attached (pid 4127, attached, live) since 12:30Z. cairn status <app> shows the same session row.

cairn run --status --json has "session" (pid, phase, mode, since, attached, or null), "unsynced" (since and why: session, sync-off, exec or incomplete), "repository", and machine_facts with memory_mib (the guest's configured RAM) and balloon; cairn run --ls --json has running_memory_mib, the sum of the running run apps' configured memory: a ceiling, not memory in use.

Removing an app by name ​

cairn destroy <app> on a cairn run app does the same recovery as --rm: it syncs and recovers first, refuses while a session is attached or the folder is missing, and --discard skips the recovery. A stopped cairn run app keeps its unsynced files on its disk. If someone's access was removed, re-add them for the recovery, then remove them again (see security).

How it works ​

  • The app is a normal cairn app (see concepts): cairn ps, cairn stop <app> and cairn destroy <app> work on it, and its record lives in $CAIRN_HOME/apps/<app>/, with the sync's baseline, report and log in apps/<app>/sync/. See configuration.
  • Your folder is copied in and the sync's host half runs in cairn; its guest half is part of cairn's guest init, so any image works without extra tools.
  • Each run app has two locks under $CAIRN_HOME/run/cairn-run/apps/<app>/: session.lock, held by the one session or run command working on the app (the file names its holder, so --status can read it without taking it), and sync.lock, held by whatever is syncing, and by cairn pause while it pauses. The session's phase and whether the folder is unsynced are in apps/<app>/sync/session.json.
  • Each app gets a default network named after the app when the name fits (at most 32 characters), and by a derived name otherwise.
  • Values forwarded with -e or an alias travel over vsock in the session's start frame.