Skip to content

feat(control): let autopilots manage the sessions people start - #661

Merged
kalaspuff merged 5 commits into
mainfrom
fctl/1724-autopilot-sessions-able-to-manage-other
Nov 30, 2026
Merged

kalaspuff merged 5 commits into
mainfrom
fctl/1724-autopilot-sessions-able-to-manage-other

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An autopilot can now manage the sessions people start in its places as it does its own. A new power, others (Manage people's sessions on the Autopilot tab, fctl autopilot set --powers …,others), does the following:

  • Wakes: fctl wakes the autopilot a minute after one of those sessions ends a turn, asks something or fails, or a pull request of one that's resting merges. Their merged pull requests' checks on the base branch wake it too, as its own sessions' do.
  • Brief and wakes: they're listed apart from its own sessions, with who started each, what each said as its turn ended and what people wrote to it.
  • Acting: it can message those sessions (with files) and resume one that failed, so it can see their pull requests updated, merged and deployed along with its own work. A session it resumes carries on on its people's Claude connection, as one a message resumes does, and only while its person may still run it there.

Without the power nothing changes: people's sessions stay theirs, and the autopilot asks before helping, as before.

Those sessions stay their people's. They run on their own Claude subscriptions, don't count toward the autopilot's limits (so its messages to them are never held), and keep notifying the people who follow them. The autopilot can't interrupt, stop, rename or archive them, and it leaves one its people stopped alone: it can't message or resume it, since that would start the session again. Its briefing says the starter's word wins over its own, and the session's agent is told the same: a session whose sandbox starts while it's managed gets a line in its system prompt (SessionSpec.managed_by). One that started earlier sees each autopilot message prefixed with which autopilot wrote it and that its people's word wins. ADR 0105 records the design.

Verified with:

  • Unit tests:
    • domain: gate, briefing, brief and wake message
    • fctl-agent: the prompt line and the message prefix
    • CLI: powers parsing
    • web: settings dialog and wake text
  • Control-plane tests against the D1 stand-in: which autopilot manages a session, what the brief and wakes list, merge checks.
  • cargo xtask check lint.
  • An end-to-end run in cargo xtask dev with fake-claude. With the power on, a person's session ending its turn woke the autopilot ("Woke for people's session Prebuilt sandbox images #2"), and the wake message and brief listed it with what it said and what its starter wrote to it. The autopilot's fctl send playground#2 … reached that session, its agent saw "The autopilot wrote:" and had the new system-prompt line, and fctl stop playground#2 was refused.

The dev stack's Worker stack

In the unoptimized dev Worker, the router's frame is within about 600 bytes of the 1 MiB wasm stack on main. This change's new AutopilotWake.others list grew every event by enough to break the dev stack's setup, so UserMessage.wake is now boxed; the JSON is the same, and the router's frames measure the same as main's again. Separately, relayed autopilot calls (route → relay → dispatch) already overflow that stack in main's dev build. I ran the end-to-end check with an optimized Worker for that reason; production builds aren't affected. #660 splits the router, which fixes both.

Screenshots

What it may do, in the settings dialog, before and after (light, then dark): the new power sits right under Start and steer sessions.

before-powers-light.png
after-powers-light.png
after-powers-dark.png

How it works, before and after (light, then dark): with the power, it gets a line of its own.

before-card-light.png
after-card-light.png
after-card-dark.png

Related

Worth confirming

  • Decision: it's a power rather than a separate setting, so it sits in What it may do. It's the only power a new autopilot doesn't get by default, and --powers all leaves it out too.
  • Decision: giving it the power counts as changing how much it works, because it adds a wake for each person's session. When someone other than the owner turns it on, the autopilot moves to their subscription, unless the owner keeps it on theirs.
  • Decision: it may message people's sessions, and resume one that failed, but not interrupt, stop, rename or archive them, nor message or resume one its people stopped. A stop counts as theirs when fctl gave the reason for a person's stop, which also covers fctl stopping it because its people lost their Claude connection or workspace place, and when the host forced the stop (which can also end an idle stop, erring toward leaving the session alone). One stopped after its idle timeout or a drain still takes a message, which resumes it on its people's plan.
  • Decision: a session has at most one manager: its project's own autopilot (if that one isn't off and has the power), otherwise the workspace's autopilot. So a project autopilot without the power leaves that project's people's sessions to a workspace autopilot that has it.
  • Assumption: every non-review session people start now keeps the short said, heard and silence excerpts in its D1 row, as crew sessions already did, so that a session already running when the power is turned on has them. These are excerpts of what the transcript already holds, and they're deleted with the session.
  • Assumption: the autopilot's messages to someone's session spend that person's Claude plan, and choosing the power is accepting that.

fctl session


Note

Medium risk. It lets an autopilot message and resume sessions that people started, running on their Claude plans, behind a new off-by-default power. It touches permission gating and session resume.

What it does. Adds an others power so an autopilot can manage the sessions people start in its places: it is woken when they end a turn or fail, sees them in its brief, and can message them and resume ones that failed. Those sessions stay their people's: they run on their own plans, count toward none of the autopilot's limits, and one its people stopped is left alone. Since the last review, resuming a managed session also checks that its person may still run it on their connection, and a forced stop counts as the person's.

Spends people's plans. Autopilot messages and resumes of people's sessions run on those people's Claude subscriptions, and the power is off by default and left out of --powers all.

fctl review's first look at 975155d · 30 files, +1536 −151 · Review agent settings

fctl-sh Bot added 3 commits November 30, 2026 11:46
A new autopilot power, `others` (Manage people's sessions), has an
autopilot look after the sessions people start in its places as it does
its own: fctl wakes it as one ends a turn, asks something or fails, its
wakes and brief list them with what each said and what people wrote to
it, their merges' checks on the base branch wake it, and it messages
them and resumes one that failed. It never interrupts, stops or changes
one, they count toward none of its limits, and what their people ask
wins over what it asks, which their agents hear in their system prompt
(SessionSpec.managed_by) or in each of its messages.

People choose the power: a new autopilot goes without it, and giving it
counts as changing how much it works. A session has one manager at most:
its project's own autopilot, else its workspace's (ADR 0105).
…s stack

The wake's new list of people's sessions grew every event, and with it
the unoptimized router's frame, past what the dev Worker's 1 MiB stack
holds as the dev stack sets itself up. Boxed, the router's frames are
main's again; JSON is the same.
@fctl-review

This comment has been minimized.

Comment thread crates/fctl-control/src/autopilots.rs Resolved
Comment thread crates/fctl-control/src/autopilots.rs Resolved
…irs on their plan

From fctl review of 7903ac0: a managed session the autopilot resumed
moved to its owner's Claude connection, and the autopilot could start
again one its people had stopped, by a message or a resume.

Now a session people started that an autopilot resumes carries on on its
own connection, theirs; the autopilot resumes only one that failed, and
neither writes to nor resumes one its people stopped
(fctl_domain::autopilot::steers_theirs, stopped_by_people), which its
wakes and brief say to leave to them.
@fctl-review

This comment has been minimized.

Comment thread crates/fctl-control/src/api/sessions.rs Resolved
Comment thread crates/fctl-domain/src/autopilot.rs Resolved
…runs them

From fctl review of c56a4c7: an autopilot's resume of a session people
started kept its Claude connection even once its person could no longer
run it there, so it failed again at once and woke the autopilot to try
again; it now refuses, leaving the session to its people. A stop the host
forced ("Stopped (forced)") counts as people's too, so that the autopilot
doesn't message one a person stopped whose agent was slow to stop.
@kalaspuff
kalaspuff merged commit da4bacb into main Nov 30, 2026
12 of 14 checks passed
@kalaspuff
kalaspuff deleted the fctl/1724-autopilot-sessions-able-to-manage-other branch November 30, 2026 13:32
kalaspuff pushed a commit to hyperstructure/design that referenced this pull request Nov 30, 2026
## Summary

The Autopilot tab's doc now covers the new power that lets an autopilot
manage the sessions people start in its places, from
hyperstructure/fctl#661. *What it may do* lists *Manage people's
sessions* first, right under *Start and steer sessions*, as the one
power a new autopilot goes without. *How it works* gives it a line of
its own. Giving the power counts as changing how much the autopilot
works, for whose subscription it runs on.

The doc describes the tab as that pull request builds it; its
screenshots show both parts.

- hyperstructure/fctl#661

[fctl session](https://app.fctl.sh/s/ses_01M8P2ZXHFYBPBG932N58K0E0N)

<!-- FCTL_REVIEW_SUMMARY -->
---

> [!NOTE]
> **Low risk.** It only edits one design doc,
`docs/web-app/autopilot.md`, with no code, tokens or assets changed.
>
> **What it does.** Updates the Autopilot tab's design doc for the new
power that lets an autopilot manage the sessions people start in its
places, from hyperstructure/fctl#661. The doc now lists *Manage people's
sessions* first among the powers, off by default for a new autopilot,
adds a line for it under *How it works*, and counts giving it as a
change that moves the autopilot onto the changer's subscription.
>
> <sub>[fctl
review](https://app.fctl.sh/s/ses_01M8P6NZ9TMXKQVT1AGPZSKS8R)'s first
look at
[`96819e2`](96819e2)
· 1 file, +13 −7 · [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>
fctl-sh Bot added a commit that referenced this pull request Nov 30, 2026
Main's autopilots managing people's sessions (#661) took ADR 0105, after
this branch's 0104: the index keeps both rows. Its boxed UserMessage.wake
and this branch's Slack fields build together, and with this branch's
router split the dev Worker's deepest router frame is 408 KB, under the
1 MiB stack that #661 found main's relayed autopilot calls overflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant