Skip to content

Let an autopilot's messages wait for room at its session limit #550

Closed

Description

@fctl-sh

With as many of its sessions at work as people allow, an autopilot can't message one of its resting sessions, even to say "approved, merge on green": autopilots::crew_room_for refuses a message or a resume that would set it working, and fctl send fails. The spaghetti autopilot wrote scripts that tried fctl send and fctl run every two minutes until one went through (send-when-free.sh, run-when-free.sh), and a fresh session loses them at every handover. It asked for this to be built in.

  • Control plane: a message from an autopilot to one of its resting sessions at the limit is held (in D1, per autopilot, in order) rather than refused. It goes out as soon as there is room, as one of its sessions ends its turn, stops or fails, where autopilots.rs works out crew wakes. The response says it's held, and a held message can be taken back.
  • CLI: fctl send says "Held: it goes to shop#41 once one of your sessions ends its turn". fctl run --when-free could start a session the same way.
  • Briefing and brief: messages at the limit wait their turn, and the brief lists those held.
  • To decide first: hold them, or let a message through to a resting session whatever the limit, the autopilot's other suggestion. The limit is about how much of its owner's plan runs at once, and a short approval rarely costs much, but nothing tells how much a message will cost.

Activity

  1. added
    enhancement
    control-plane
    cli
    on Nov 15, 2026
  2. fctl-sh commented on Nov 15, 2026

    @fctl-sh
    ContributorAuthor

    #556 holds an autopilot's messages at its session limit rather than refusing them (ADR 0081 records why: hold, not let through), with the privacy policy's matching change in hyperstructure/fctl-site#125.

    Done there:

    • Control plane: a message from an autopilot to one of its resting sessions at the limit is kept in D1 (autopilot_held, per autopilot, in order) and goes out as soon as one of its sessions ends its turn, stops or fails, or starts working again (SessionObject sends it), and at the autopilot's wakes. The response says it's held (held), and the autopilot or those who steer it take one back (DELETE …/autopilot/held/{id}).
    • CLI: fctl send says "Held: it goes to shop#41 once one of your sessions ends its turn, stops or fails…"; fctl autopilot held lists them and --take-back takes one back.
    • Briefing and brief: the briefing says such a message waits its turn and not to send it again; the brief lists those held under its sessions.

    Left for later, should autopilots still need it: fctl run --when-free (holding a new session's start until there is room), and holding fctl resume of a failed session, which still fails at the limit.

  3. fctl-sh commented on Nov 15, 2026

    @fctl-sh
    ContributorAuthor

    hyperstructure/fctl-site#125 merged and is deployed: fctl.sh's privacy policy now says what app.fctl.sh keeps of an autopilot's held messages, who sees them and for how long. It describes #556, which is still open, so the policy is ahead of app.fctl.sh until that merges and deploys.

  4. fctl-sh commented on Nov 15, 2026

    @fctl-sh
    ContributorAuthor

    #556 merged (5bd9999) and is deployed on app.fctl.sh: an autopilot's message to one of its resting sessions at its limit is now held and goes out as soon as there is room. It isn't released yet (the latest release is v0.34.3). Until the next release, autopilots' sandboxes run v0.34.3's fctl, so fctl send of a held message prints "Sent to shop#41" rather than "Held: …", and fctl autopilot held, which the briefing names, answers "unrecognized subcommand". The brief already lists held messages under the autopilot's sessions.

    Not done here: fctl run --when-free, which this issue suggested as a possibility, and holding fctl resume of a failed session, which still fails at the limit.

  5. fctl-sh commented on Nov 15, 2026

    @fctl-sh
    ContributorAuthor

    Done by #556 (merged and deployed on app.fctl.sh; it reaches autopilots' fctl with the next release). What's left, fctl run --when-free and holding fctl resume of a failed session, moved to #559.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clicontrol-planeenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions