Working with Sessions

Finding a session

sonny mesh sessions                 # running sessions
sonny mesh sessions -a              # include completed
sonny mesh sessions --search refactor   # substring over session, pack, model, provider, node
sonny mesh sessions --sort assurance    # updated | assurance | backend | isolation-state

The filters are designed for answering “did this actually run where I said it should”:

FlagMatches on
--isolation-backendthe backend the session achieved (for example docker)
--isolation-assurancethe assurance level achieved
--isolation-statethe isolation verification state
--searchfree text across session, recipe, model, provider, or node
--sortupdated (default), assurance, backend, isolation-state
-a, --allinclude completed sessions

Attaching

sonny mesh attach <session-id>              # drive it
sonny mesh attach --read-only <session-id>  # watch only

--read-only is the safe default for supervising someone else’s worker: you see the stream, you cannot type into it.

Detaching

sonny mesh detach                  # leave this session running in the background
sonny mesh detach --stop           # pause it instead of leaving it running
sonny mesh detach <session-id>     # detach a specific session

Detach is deliberately the non-destructive option. The session keeps its context on the hosting node and you can re-attach later; --stop pauses it rather than backgrounding it.

Transferring

sonny mesh transfer <session-id> <target-node>
sonny mesh transfer --force <session-id> <target-node>

Transfer moves a live session to another node. --force transfers even while the session is active — use it when you have already stopped writing to it, because two drivers on one session is exactly the race --force lets you create.

Terminating

sonny mesh terminate <session-id>
sonny mesh terminate <session-id> --force --reason "abandoned after rebase"
sonny mesh terminate --all --node worker-a --yes
sonny mesh terminate --all --all-nodes --yes

Two guards worth knowing:

  • --all refuses to run unless you also scope it with --node <id> or --all-nodes.
  • --all asks for confirmation unless you pass --yes.

--force skips graceful shutdown, so an in-flight tool call is cut rather than drained. Prefer the default and reserve --force for a session that is already wedged.

Pushing a local session out

sonny mesh push

push sends the current session to a remote node so it survives your terminal closing. Combined with attach from another machine, this is the simplest way to hand a long job to a build host and walk away.

Typical flow

# on the laptop: start work and hand it to the build host
sonny run --pack go-refactor
sonny mesh push

# on the build host (or back at the laptop later): find and drive it
sonny mesh sessions --search go-refactor
sonny mesh attach 9f2c1a…

# later, move it to a bigger box and leave it running
sonny mesh transfer 9f2c1a… worker-b
sonny mesh detach