Skip to content

Turn follow-ups on by default #247

Closed

Description

@fctl-sh

What is wrong or missing

A project's agents come back to the pull requests they opened only where someone turned that on: Settings → Pull requests, or fctl projects set --follow-ups. That covers comments that mention the agent, failed checks, merge conflicts, and a merge or close. All four switches start off (ADR 0043, ADR 0045). Each new kind also started off in projects that already used the others, including those set with --follow-ups all.

In session #209 this meant that #246 began to conflict with main when #245 merged (2026-10-23 22:18 UTC), and its agent wasn't told. The person found the conflict on GitHub and had to ask the agent to merge main in. They had expected follow-ups to handle it, and only then found the fctl project's Merge conflicts switch off. Nothing on the session page said the pull request conflicted either. A session keeps its pull requests' state and checks (PullRequestRef) but not whether they conflict, so a conflict shows only when a follow-up passes it on. With the switch on, the code would have handled that case: #245's merge delivery looks #246 up (crate::pull_requests::moved_onto), the session asks GitHub again while it says UNKNOWN, and the conflicts wait for the agent's turn to end and reach it 10 s later. I traced this in the code but didn't run it against GitHub.

People expect agents to see their pull requests through without first finding these switches. They should be on unless someone turns them off.

How it works now

  • Defaults. FollowUps (crates/fctl-proto/src/session.rs) derives Default, so comments, checks, closed and conflicts are all false, and ProjectSettings::default() uses it. Both structs are #[serde(default)]: a stored project without follow_ups, or without one of its fields, reads as off. The doc comment on ProjectSettings::follow_ups says "All off by default".
  • What new projects store. api::projects::create (crates/fctl-control/src/api/projects.rs) stores the whole ProjectSettings as JSON. Projects created since follow-ups exist store each switch, as false unless the request turned it on. Projects from before feat: let comments, failed checks and merges bring agents back #228 have no follow_ups at all, and those from before feat: let merge conflicts bring agents back to their pull requests #238 have no conflicts.
  • A precedent for new projects. fctl_domain::settings::for_new_project (crates/fctl-domain/src/settings.rs) already gives new projects their own value for a setting the create request leaves out. Claude.ai connectors start off for new projects, though a stored project without the field reads them as on. keep_unsent in the same file keeps the stored follow-ups that an update leaves out.
  • What the create paths send.
    • The web's new-project form (web/src/routes/new-project.tsx) sends settings without follow_ups.
    • fctl projects create sends no settings.
    • fctl projects create --connectors (crates/fctl/src/cmd/projects.rs) sends a whole ProjectSettings (..Default::default()), so follow_ups arrives with every switch false.
  • Where the switches are read.
    • In Rust through serde: crate::follow_ups::route and takes (crates/fctl-control/src/follow_ups.rs).
    • Once in SQL: after a merge, crate::pull_requests::moved_onto (crates/fctl-control/src/pull_requests.rs) looks up the other pull requests only where json_extract(mp.settings, '$.follow_ups.conflicts') = 1. A missing key is NULL there, while serde reads it as the default.
  • Docs that say they start off, or that projects turn them on.
    • docs/architecture.md, Follow-ups ("all off by default").
    • docs/self-hosting.md, Follow-ups ("Each project turns them on in its Settings").
    • docs/cli.md.
    • ADRs 0043 and 0045.

What should happen

  • New projects start with all four on: comments that mention the agent, failed checks, merge conflicts, and merged or closed. A create request that sends follow_ups, or some of its fields, keeps what it sends, and the rest are on. This goes in settings::for_new_project, beside the connectors, with tests there.
  • Stored projects keep reading as they do now (a missing switch is off), unless the decision below turns them on. Because new projects store each switch explicitly, serde and the SQL in moved_onto keep agreeing. Changing FollowUps::default() instead would flip projects from before feat: let comments, failed checks and merges bring agents back #228 and feat: let merge conflicts bring agents back to their pull requests #238 on in Rust but not in that SQL.
  • fctl projects create --connectors stops turning follow-ups off by sending FollowUps::default(): it sends only what it sets, or the new defaults. A CLI one version behind still sends them off.
  • Existing projects: as decided below. If they are turned on, add a D1 migration in crates/fctl-control/migrations (after 0029) that updates projects.settings with json_set, and say so in the pull request, which becomes the release notes.
  • Update the docs above, and add an ADR that supersedes the "all off" decision of ADRs 0043 and 0045. It should say why follow-ups are now on by default, and what bounds the cost: each follow-up runs a turn on the Claude subscription of the person whose session opened the pull request, with at most three failed checks or three conflicts in a row while nobody messages the agent, and once for a merge or close.
  • hyperstructure/fctl-site's privacy policy (legal/privacy.md) describes what follow-ups pass on "where the project's follow-ups are on". Check that it still reads right once they are on unless turned off, and change it in the same release if not.

Compatibility

This changes the control plane (fctl-domain, fctl-control) and the CLI's projects create. Hosts and agents need nothing. The protocol doesn't change: stored settings and FollowUps keep their shape, and the web app shows what a project stores. Instances that don't take GitHub's webhook pass nothing on either way.

Decisions for a person

  • Existing projects. Either leave each one as stored, so only new projects start with follow-ups on, or turn all four on in every project with a migration. A stored false doesn't say whether someone turned a switch off or never touched it: the audit log records project.updated without the settings that changed. Turning them on would bring agents back to pull requests that conflict, fail or merge from then on, on the subscriptions of the people whose sessions opened them, including in projects whose owners chose off. Decision: Leave existing projects as it's stored right now.

Session: https://app.fctl.sh/s/ses_01M5NC3YGDDG8BZZMRARNZFWS4

Activity

  1. added
    enhancement
    control-plane
    cli
    on Oct 23, 2026
  2. fctl-sh commented on Oct 23, 2026

    @fctl-sh
    ContributorAuthor

    Done in #249, merged as b1fb790 and deployed to app.fctl.sh by its CI run on main. It isn't in a release yet (no tag contains it), so self-hosted instances and the CLI's projects create --connectors change get it with the next release.

    All the items above are done: new projects start with all four follow-ups on (settings::for_new_project, with tests). Existing projects keep what they store, as decided, so there is no migration. fctl projects create --connectors sends FollowUps::ALL. The docs are updated, with ADR 0051. fctl-site's privacy policy needed no change: it says "where the project's follow-ups are on", which still holds.

    Session: https://app.fctl.sh/s/ses_01M5NFNH5ZCX4BA0S6QERHAB57

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