Repository navigation
feat: move sessions off runners that went quiet, at once or when asked - #678
Merged
kalaspuff merged 8 commits intoDec 3, 2026
Merged
Conversation
…their sessions at once
FleetDO tells a session once its runner has been offline a minute; an autopilot's own session with a wake or message waiting wakes its autopilot, which carries on elsewhere. A hand-off doesn't wait for a turn on a runner that went away. The autopilot's view says when its session's runner was last heard from, and the CLI, the Autopilot tab and the session page say what follows. ADR 0108.
fctl move, POST /sessions/{id}/move, and Move to another runner on the
session page, its stall notice and the Autopilot tab. FleetDO keeps the
session off that runner until it starts elsewhere; a runner online stops
it first, for a minute at most, and one offline is let go at once. A
second stop a minute after the first, which its runner didn't carry out,
lets go of the runner too.
This comment has been minimized.
This comment has been minimized.
…out a page open SessionDO marks a quiet uplink before it reads whether the runner went away, as a viewer's ping would. The CLI's status line, the --fresh help and the docs say a hand-off doesn't wait for a turn on a runner that went away.
Contributor
Author
|
On the review's second finding ( |
This comment has been minimized.
This comment has been minimized.
…pires A session queued again while its run stopped on a runner that stayed offline has its runner cleared, so that runner doesn't take it back as it reconnects. The runner-away copy holds where no other runner online would run the session: the wake waits for one then.
kalaspuff
approved these changes
Dec 3, 2026
kalaspuff
deleted the
fctl/1817-if-the-sandbox-for-an-autopilot-cannot-b
branch
December 3, 2026 17:11
kalaspuff
pushed a commit
that referenced
this pull request
Dec 3, 2026
) ## Summary Since #678, the notice the session page shows when a runner's work isn't coming through offers *Move to another runner* to the session's owner, review agents' sessions included. The ⋯ menu leaves the item out for reviews, and `POST /sessions/{id}/move` refuses them. So the click failed with an unrelated toast ("Review agents take no messages…"). The transcript now takes its own `canMove`, which the session page sets for the owner unless the session is a review. `canManage` still governs everything else it did. Verified with a new transcript test: the move appears with `canMove` and not without it, for a reader who still manages the session. The test fails without the fix. `npm run check` and the web app's whole test suite pass. There is no screenshot: the only visible change is that the button no longer appears on a review session's stall notice, and other sessions' notices look as before. - #679 Refs #678 [fctl session](https://app.fctl.sh/s/ses_01M8YGVKC8CD8CGJ4FXTRRN7EG) <!-- FCTL_REVIEW_SUMMARY --> --- > [!NOTE] > **Low risk.** A small web-only change that hides one button for review agent sessions; nothing else reads the new prop. > > **What it does.** Review agent sessions can't be moved to another runner, but the stall notice still offered "Move to another runner" to their owner. This adds a `canMove` prop to `TurnTranscript`, set in the session page to `isOwner && !session.review`, and uses it instead of `canManage` for the move button. A test covers both cases. > > <sub>[fctl review](https://app.fctl.sh/s/ses_01M8YHB0382Q8YGTJQMAXX4PMY)'s first look at [`f77e613`](f77e613) · 3 files, +21 −2 · [Review agent settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub> <!-- /FCTL_REVIEW_SUMMARY --> Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
kalaspuff
pushed a commit
to hyperstructure/design
that referenced
this pull request
Dec 3, 2026
## Summary The web app's docs for what fctl's change to sessions on a runner that went quiet shows: the stall notice's *Move to another runner* button and what it says under it, the autopilot's own session's stall copy, the session's ⋯ item, the Autopilot tab's **Runner away** phase and its *Move its session to another runner* item, and a hand-off that doesn't wait for a turn on a runner that went away. - hyperstructure/fctl#678 [fctl session](https://app.fctl.sh/s/ses_01M8Y4VQXXFVA9MTVGAPXBB2EZ) <!-- FCTL_REVIEW_SUMMARY --> --- > [!NOTE] > **Low risk.** Documentation only, in two web-app spec files. > > **What it does.** Documents what happens when a session's runner goes quiet: the transcript's runner-away notice, a new `Move to another runner` button under any stall and in the session's ⋯ menu, and how an autopilot's session is replaced on another runner. It also adds the matching 'Runner away' status row and menu item to the autopilot page, with the wording for when no other runner is online. > > <sub>[fctl review](https://app.fctl.sh/s/ses_01M8YAA92QE3CXFHYZ2BZ2FXCX)'s first look at [`c521374`](c521374) · 2 files, +15 −3 · [Review agent settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub> <!-- /FCTL_REVIEW_SUMMARY --> --------- Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A runner on a laptop that went to sleep kept its control connection open, so fctl counted it online for as long as anyone watched: the runners list said "online" 11 minutes after its last heartbeat. Everything on it waited. A wake or follow-up to an autopilot whose own session was there sat in that session's outbox, Stop left it "Stopping", and Hand off to a fresh session waited for a turn that couldn't end. This makes fctl stop waiting for such a runner, and lets people move a session off it themselves (ADR 0108):
away: a wake that reached the old session first, a person's message to it, and a turn the ten minutes cut off. A hand-off people ask for doesn't wait for the turn to end. The autopilot's view says when its session's runner was last heard from (AutopilotSession.runner,runner_away_since). The Autopilot tab andfctl autopilotshow Runner away, and the hand-off's copy in the CLI and the toast says what happens. Where no other runner online would run it, the wake waits for this one, and the copy says a fresh session takes over "where one online would run it".fctl move,POST /api/v1/sessions/{id}/move, the session's ⋯, the stall notice, and the Autopilot tab's ⋯ for its own session). This is for a laptop that wakes for a moment now and then: it is online for those moments, which keeps its sessions from stopping, but gets no further with them. The session leaves that runner, which doesn't get it back until it has started elsewhere. A runner online is asked to stop it first, for a minute at most, so its agent saves a snapshot; one offline is let go at once. A second Stop a minute after a first that wasn't carried out lets go of the runner too, rather than staying "Stopping".I verified it in
cargo xtask devwith a second host frozen withSIGSTOPas the laptop. The runner shows offline within a minute and a stop is immediate. A wake that landed in the stranded autopilot session moved the autopilot to a fresh session on the other runner, and so did a hand-off mid-turn.fctl moveand the notice's button moved a running session to the other runner. When the frozen host woke, it stopped its old run, its uplink and snapshot upload were refused, and the moved session carried on undisturbed. The domain, CLI, proto and web tests and the control plane's 90 tests in Node pass, and Clippy (native and wasm) is clean.Screenshots
A session on a runner that went quiet: before, the notice says to wait; after, its owner can move it, and is told what that keeps.
The autopilot's own session there (a fresh one, #15, in the after shot): before, nothing says what happens; after, the notice says the autopilot doesn't wait, and its card says Runner away.
The Autopilot tab, light theme: before it said "Waiting for you" as if all were well; after, Runner away and what follows.
The session's ⋯ with the new item, the notice at a phone's width, and the session a moment after Move to another runner, carrying on on dev-host.
The design docs change with it:
Worth confirming
fctl session
Note
Medium risk. It changes when fctl treats a runner as offline and when sessions and autopilots move off it, which affects every running session, though only for runners that go quiet.
What it does. A runner silent for a minute now counts as offline, so stops don't wait for it and an autopilot whose own session sits there carries on in a fresh session on another runner. People can also move a session to another runner themselves (
fctl move,POST /api/v1/sessions/{id}/move, the session menu and the stall notice). Since the last review, a session moved off a runner that then went offline has its old runner cleared when its assignment expires, and the 'Runner away' wording says a fresh session takes over only where another runner online would run it.Offline threshold and alarm. A runner silent for one minute is offline, and FleetDO's alarm now ticks every 30 seconds while any session runs, so a stalled host can lose its sessions sooner than before.
fctl review's first look at
74742f7· 37 files, +1530 −199 · Review agent settings