Repository navigation
docs(legal): say what follow-ups receive, keep and send - #46
Merged
kalaspuff merged 1 commit intoOct 23, 2026
Merged
Conversation
Where a project's follow-ups are on, app.fctl.sh receives comments on pull requests through the GitHub App's webhook, asks GitHub whether their authors may write to the repository, and passes those that mention an agent, with their authors' GitHub logins and pictures, to the session that opened the pull request, with its failed checks and its merge. The GitHub App reacts to each comment it passes on, and the audit log records it.
kalaspuff
approved these changes
Oct 23, 2026
kalaspuff
deleted the
fctl/161-it-should-be-possible-to-configure-proje
branch
October 23, 2026 12:25
kalaspuff
pushed a commit
to hyperstructure/fctl
that referenced
this pull request
Oct 23, 2026
Projects can now bring their agents back to the pull requests they opened (**follow-ups**): a comment that mentions the agent, a failed check, a merge. Each reaches the session that opened the pull request in a message from fctl, which resumes the session if it stopped, on the Claude subscription it ran on, as a person's message would. Fixes #8, as the session refined it: comments count only from people the repository trusts, only when they address the agent, and only from people, not apps. ## What it does - **A project setting, three switches, all off** (Settings → **Pull requests**, `fctl projects set --follow-ups comments,checks,closed` / `all` / `none`, `ProjectSettings.follow_ups`). `fctl projects show` says which are on. An update that leaves the field out (an older tab or CLI) keeps what was stored. - **Comments that address the agent**: a new comment on the conversation, a review, or a comment on lines, that mentions `@fctl` or `@agent` anywhere, or starts with `fctl:`, `agent:`, `fctl,` or `agent,` (any case). Quotes (`>`), code (backticks, fenced blocks) and HTML comments don't count, so people can quote a request or write `` `@fctl` `` to explain it; edits don't count either. A review that addresses the agent brings its comments on lines. - **Only people the repository trusts**: the commenter must be a person (GitHub's `User`, not a `[bot]`, so not fctl's own review agents, whose findings already come back on their own path), with an `author_association` of `OWNER`, `MEMBER` or `COLLABORATOR`, **and** GitHub's permission endpoint must say they may write to the repository (admin, maintain or write). A member of an organization who may only read a public repository can't steer an agent that pushes. Everyone else costs no GitHub call. - **Failed checks**: after a `check_run`/`check_suite`/`status` delivery, the lookup names the newest commit's failed checks (failed, timed out or couldn't start, by each check's latest run, and failed or errored statuses; cancelled runs and runs waiting for approval don't count). - **Merged or closed**: who merged or closed it (a merge queue's bot counts as nobody) and into which branch. - **Only fctl's own pull requests, to the session that opened them**, chosen as for review findings (ADR 0041). Archived and failed sessions, archived projects and agents that only read on GitHub get nothing. - **How the agent hears of it**: the session gathers what comes for ten seconds, so a review and its comments, which arrive as separate deliveries, or checks that fail together, make one message per pull request. The control plane writes it: who wrote what and where, quoted, how to answer each where it was made (`gh pr comment`, or `gh api …/comments/{id}/replies` in a thread); which checks failed, what still runs, and how to look into them; after a merge, what may be left to do. It says that only people who can write to the repository reach the agent this way. - **Failed checks don't nag**: they wait while a turn runs (the agent may already be on them) and ten seconds more once it ends, then go only while GitHub still says they are the newest commit's and failed. A newer commit (the agent's or anyone's push) or a passing re-run drops them. After **three in a row** while nobody messaged the agent, or wrote to it on GitHub, the transcript says what failed instead, until someone does. - **On GitHub**: an 👀 reaction on the comment once its session has it, with a token for that repository alone, revoked right away. The workspace's audit log records each comment passed on (`follow_up.comment`). - **In the app**: the transcript shows a follow-up as GitHub has it: the commenter's avatar and login, what they wrote as Markdown (pictures as links, since the app only loads images from where it trusts), a review's verdict and its comments under their files, failed checks by name, a merge, with **What fctl told the agent** a click away. Held checks show muted, with why. A session's page says under its pull requests what brings its agent back ("Mention @fctl or @agent on GitHub to bring the agent back; failed checks and merges do too."). Settings say when the instance takes no webhooks. ## Decisions worth a look - **"Trusted users in the GitHub organization" became write access, checked with GitHub.** The association alone would let read-only org members of a public repository steer an agent that pushes and holds the project's secrets. Write access is the bar the repository already sets for changing its code. - **Only deliveries bring agents back.** The hourly sweep that repairs missed deliveries keeps pull requests current without waking anyone, so turning follow-ups on, or a delivery that went missing, never wakes sessions for what happened long ago. - **Staleness is GitHub's word, not the sandbox's.** An earlier version dropped failed checks when the agent had another commit checked out; a person's push to the agent's branch makes that true too, so it now goes by the pull request's head as GitHub reports it. - **Merge conflicts** don't bring agents back: no delivery says when a pull request starts to conflict with its base. It's in the roadmap. - ADR 0043 records the reasoning. ## What instance admins need to do Subscribe the GitHub App to **Issue comment**, **Pull request review** and **Pull request review comment** (Permissions & events). No new permission: the app reads and writes issues and pull requests already, so installations accept nothing. **app.fctl.sh's app needs this change** for comments; failed checks and merges work with the events it has. Recent Deliveries answers `{"ok":true,"follow_ups":1}` for a comment that reached an agent. ## Compatibility All additive: `ProjectSettings.follow_ups`, `UserMessage.follow_up`, `Notice.follow_up` (older clients show the message's text), `Features.github_webhook`, and the internal `/follow-up` and `PullRequestsSeen.follow_ups`. `FollowUpEvent` reads kinds a newer control plane adds as `other` instead of failing the event. No migration: the session object's `follow_ups` table is created `IF NOT EXISTS`. Older hosts and agents take follow-ups as any message; fake-claude answers them on its own, so their words set off none of its behaviors. ## A bug this found on the way GitHub's GraphQL API names an app's bot without `[bot]` (`fctl-sh`, type `Bot`), where REST says `fctl-sh[bot]`. The webhook lookups now ask for the author's type and spell bots as REST does; without that, failed checks of fctl's own pull requests would never have matched. I checked it against #225 with the sandbox's token. ## How I verified it - **Unit tests**: `fctl_domain::follow_ups` (16 tests: addressing, with quotes, code spans, fences, HTML comments, emails, `@fctl-sh`, team mentions; payload parsing of the three comment events; trust and write access; keys; grouping; every message; the cap), webhook lookups (failed check names, bot authors), settings that keep unsent follow-ups, the proto wire format (and an unknown kind), the CLI flag, fake-claude, and the web helpers and component (`follow-ups.test.ts`, `follow-up.test.tsx`). `cargo xtask check` passes. - **End to end in `cargo xtask dev`**, against a local stand-in for GitHub's API and a bare repository standing in for `acme/web` (not committed; the Worker pointed at it by a local patch I reverted), with signed deliveries: - **Ignored, each for its reason**: a bot (`renovate[bot]`), a `CONTRIBUTOR`, a `MEMBER` GitHub says may only read (the only one that cost a call), a comment without a mention, `@fctl` in backticks, a quoted request; an archived session; a project with comments off. - **A comment** from a member who can write: one message, the agent answered, 👀 on the comment (token for `web` alone, `issues`/`pull_requests` write, revoked). - **A review** with two comments on lines, sent as GitHub does (three deliveries): one message with the comments under the review; the comments' own deliveries added nothing. - **Failed checks**: two deliveries made one message naming "Rust tests and Clippy, 1 still running, 4 passed". - **During a turn**: checks that failed while the agent worked reached it ten seconds after the turn ended; those of a commit the agent had already replaced were dropped. - **A person's pushes** to the agent's branch, each failing: three reached the agent, the fourth only left the muted note. - **A merge**: one message ("merged into main by @ada") from two deliveries; a comment on the merged pull request told the agent to put changes in a new pull request from the updated main. - **A stopped session** resumed for a comment, and its agent answered it. - An older client's settings update kept the stored follow-ups. ## Screenshots From `cargo xtask dev` with the runs above, at f66ec00. GitHub avatars are generated stand-ins. **Settings → Pull requests** (light, dark, 390 px):    **A session brought back by a comment**, with what brings its agent back under its pull request:  **A review with its comments on lines** (light, dark):   **Failed checks, then a merge**, and **what fctl told the agent**, opened:   **Held back** after three in a row:  **On a phone** (390 px):  ## Other repositories - hyperstructure/fctl-site: the privacy policy says what follow-ups receive, keep and send (hyperstructure/fctl-site#46). Session: https://app.fctl.sh/s/ses_01M5M5MN1ME75KPJSE74983JEE --------- Co-authored-by: fctl-sh[bot] <343971779+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.
The privacy policy says what follow-ups receive, keep and send, for hyperstructure/fctl#228, which lets projects bring their agents back to the pull requests they opened: when someone who can write to the repository mentions
@fctlor@agentin a comment, when a check fails, when a pull request merges or closes.With follow-ups on in a project, app.fctl.sh:
The changes:
Retention needs no change: follow-ups are part of the session's transcript, which goes with the project.
Session: https://app.fctl.sh/s/ses_01M5M5MN1ME75KPJSE74983JEE