You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let an autopilot attach files to the sessions it starts #517
An autopilot can't attach files to the sessions it starts: fctl run --attach and fctl send --attach fail in its own session's sandbox. Its sandbox's fctl has no token and relays its requests through fctl-agent and the host as AgentCall::Api, whose body is JSON only (Api::relayed in fctl-client says uploads don't work through it), and fctl_domain::autopilot::allows refuses POST /projects/{id}/attachments and POST /sessions/{id}/attachments. Since #516 it passes screenshots on as links it publishes with fctl publish, which works only where the project publishes screenshots, and the session then has to download the image to see it.
Carl Oscar suggested letting the API take attachments from autopilots too, so that a screenshot people send it reaches a session as an attachment, shown to that session's agent like any other.
Protocol: an optional way to carry a binary body in AgentCall::Api (for example body_base64 with a media type), added as optional fields; hosts and agents a version behind keep refusing it.
fctl-client and fctl: uploads through the relay, so --attach works in the autopilot's sandbox.
Control plane: allows lets an autopilot upload to start a session in its projects (Gate::Open, like starting one) and to sessions it started (Gate::Crew); the relay's frames go through the Worker's stack, so check a 5 MB upload's size against the frame limit and box the large futures (as fctl#505 did).
Another case for this, from the spaghetti autopilot (asked by Carl Oscar what fctl could do better): Carl Oscar attached his .3mf files to one of its sessions, another session needed them later, and the autopilot had to ask him to attach them again. It suggested letting an autopilot forward files people already sent, or keeping files people send available to every session in the projects it manages.
Forwarding may be the cheaper half of this issue: those files are already stored on the control plane, so an autopilot could send them on by reference, e.g. fctl send shop#43 --forward shop#41 (the files people attached to their messages to shop#41), with no binary body through the relay. Its own uploads (a screenshot people sent it) would still need what this issue describes.
Done in #558, merged as 236de9f: an autopilot attaches files to the sessions it starts and steers (fctl run --attach, fctl send --attach) and reads the files sent in the sessions it reads (fctl files list / fctl files get, new, for people too), through its session's relay as bytes (AgentCall::ApiBytes, POST /api/v1/runner/sessions/{id}/relay).
It isn't in a release yet. The control plane part reaches app.fctl.sh with main's deploy, but autopilots use it only once their runner runs a release with it (fctl-agent and the host) and their sandbox image's fctl has fctl files. Until then their ~/AGENTS.md keeps telling them to pass screenshots on as published links.
As Carl Oscar decided, sessions still don't send files they make back to the autopilot: what one makes for another goes on its branch, or as a published screenshot.
Activity
feat(autopilot): send an answer's files to the session the ask names (#…
feat(autopilot): pass on more lessons, and read the brief in parts (#544
fctl-sh commentedon Nov 15, 2026
Another case for this, from the spaghetti autopilot (asked by Carl Oscar what fctl could do better): Carl Oscar attached his
.3mffiles to one of its sessions, another session needed them later, and the autopilot had to ask him to attach them again. It suggested letting an autopilot forward files people already sent, or keeping files people send available to every session in the projects it manages.Forwarding may be the cheaper half of this issue: those files are already stored on the control plane, so an autopilot could send them on by reference, e.g.
fctl send shop#43 --forward shop#41(the files people attached to their messages to shop#41), with no binary body through the relay. Its own uploads (a screenshot people sent it) would still need what this issue describes.docs(autopilot): tell attachments apart from an autopilot's own files
fix(autopilot): answer review findings on the file relay
fix(autopilot): list only files sessions got, and write over none una…
chore: regenerate the session files' types for their new doc comments
fix(cli): leave nothing behind when fctl files get fails
fix(cli): write fctl files get's parts as new files, through no link
fctl-sh commentedon Nov 15, 2026
Done in #558, merged as 236de9f: an autopilot attaches files to the sessions it starts and steers (
fctl run --attach,fctl send --attach) and reads the files sent in the sessions it reads (fctl files list/fctl files get, new, for people too), through its session's relay as bytes (AgentCall::ApiBytes,POST /api/v1/runner/sessions/{id}/relay).It isn't in a release yet. The control plane part reaches app.fctl.sh with main's deploy, but autopilots use it only once their runner runs a release with it (fctl-agent and the host) and their sandbox image's
fctlhasfctl files. Until then their~/AGENTS.mdkeeps telling them to pass screenshots on as published links.As Carl Oscar decided, sessions still don't send files they make back to the autopilot: what one makes for another goes on its branch, or as a published screenshot.