Skip to content

Credit the person who started a session with a Co-authored-by trailer #15

Closed

Description

@fctl-sh

Commits from sessions are authored by the GitHub App's bot, and nothing credits the person who started the session. Half of it is built:

  • The control plane fills SessionSpec.co_authors with the starter's name and sign-in email (creator() in crates/fctl-control/src/spec.rs), and crates/fctl-proto/src/runner.rs documents the field as "Added as Co-authored-by trailers".
  • Nothing reads it. Neither fctl-agent nor fctl-host uses co_authors, so commits carry only the trailer Claude Code adds for itself.

Found in the smoke-test session for #1 (see #14).

How to add the trailer

Claude Code (2.1.302 in the default image) has an attribution setting: attribution.commit is "Attribution text for git commits, including any trailers", and attribution.pr does the same for pull request descriptions. fctl-agent already writes ~/.claude/settings.json (write_claude_config in crates/fctl-agent/src/supervisor.rs). It can set attribution.commit to Claude's trailer plus one Co-authored-by: Name <email> line per co-author. The custom text replaces Claude Code's default, which names the model, so keep an equivalent Claude line.

This covers the commits Claude makes by following its git instructions, but not commits made by scripts. A git hook would catch everything, but a global core.hooksPath turns off the repository's own hooks, and hook managers (husky, lefthook, pre-commit) replace hooks fctl installs. Rewriting commits before fctl pushes them would change SHAs the agent has already seen. Start with the setting and see whether it's reliable enough.

Which email (needs a decision)

  • GitHub credits a co-author only when the email belongs to their GitHub account: a verified address, or their [email protected].
  • The sign-in email is personal data, and commit trailers are public wherever the repository is. Putting it there changes who receives it, so the privacy policy on fctl.sh (legal/privacy.md in hyperstructure/fctl-site) needs a matching change.

Proposal: each person sets a commit email, empty by default, and gets no trailer without one. Once GitHub sign-in exists (ROADMAP, "Later"), the noreply address can come from the linked account.

What should happen

  1. Settings → Profile gets a commit email field, with the hint "Use an address your GitHub account has, so GitHub credits you". The CLI gets the same, with --json. The address is stored on the user row (new migration) and included in the data export.
  2. creator() fills co_authors only for people who set one, with that address rather than the sign-in email.
  3. fctl-agent writes attribution.commit from co_authors, and attribution.pr too if pull requests should name people. With no co-authors, it leaves Claude Code's default.
  4. fake-claude, which commits for write <name>, appends the configured attribution, so cargo xtask dev shows the trailers end to end.
  5. docs/architecture.md and docs/security.md say what goes into commits, and the fctl.sh privacy policy changes in the same release.

Open question: should people who message a session also become co-authors? fctl already prefixes their messages with their name.

Compatibility: co_authors is already in the spec, so older hosts and agents keep working; they just add no trailers.

🤖 Generated with Claude Code

https://app.fctl.sh/s/ses_01M560YQN20DK06NSEWWVYB3Q4

Activity

  1. added
    control-plane
    web
    cli
    agents
    on Oct 17, 2026
  2. fctl-sh commented on Oct 18, 2026

    @fctl-sh
    ContributorAuthor

    Pull requests: #55 (fctl), green and waiting for review, and hyperstructure/fctl-site#9 (the privacy policy), merged on 2026-10-18 and live on fctl.sh/privacy.

    What #55 does, against the list above:

    1. Settings → Profile has a "Commit email" field. Its hint says what it does, who sees it, and to use an address your GitHub account has, and it links GitHub's email settings for the noreply address. The CLI has fctl account set --commit-email (with --json; "" removes it), and fctl whoami shows it. The address is on the user row (migration 0009), in the data export, and cleared when the account is deleted. It is in Me, not User, so admins don't get it.

    2. creator() adds the starter only when they set one, with that address. One change from the plan: it goes in a new spec field, co_authored_by, and co_authors stays empty. Every control plane so far puts the sign-in email in co_authors, so an agent that read it would publish that email whenever it ran against an older control plane: a host updated between the Release workflow publishing archives and redeploying app.fctl.sh, or a self-hosted instance that lags.

    3. fctl-agent writes attribution.commit (Claude's trailer, then the person's) and leaves Claude Code's default when nobody is credited. attribution.pr stays empty: GitHub's squash merges already carry the commits' Co-authored-by trailers into the commit on main (feat: notify people when a session waits for them, pauses or fails #48's description has none, and its squash commit ca134aa ends with Claude's), so descriptions don't need to name people.

    4. fake-claude's write <name> ends its commit with the configured attribution.

    5. architecture.md and security.md say what goes into commits (so do cli.md, getting-started.md, development.md and ADR 0011). docs(legal): say what a commit email publishes and how long it stays fctl-site#9 changed the privacy policy (merged and live, ahead of feat: credit the person who started a session in its commits #55).

    Also, as asked in the session: each project chooses who its commits credit, with two switches in its settings, both on by default. "Credit people in commits" (credit_people) turns the person's trailer off, and the commit email then never reaches the sandbox. "Credit Claude in commits" (credit_claude) leaves out Claude's trailer and, in Remote Control sessions, the claude.ai session link. From the CLI: fctl projects set --credit-people off --credit-claude off.

    Decisions to confirm or change in review:

    • The proposal as written: an address people choose, empty by default, never the sign-in email.
    • When someone is credited, Claude's trailer says Claude rather than the model. fctl-agent writes the settings before Claude starts, and Claude is what Claude Code writes itself when it can't tell the version.
    • The open question stays open: people who message a session are not credited. co_authored_by can carry them later.

    Left: merging #55 and releasing it, then seeing in real sessions whether Claude ends its commits with the trailers reliably. Not verified yet: real Claude Code following attribution.commit (the dev stack runs fake-claude), and GitHub crediting a noreply address.

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

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

    agentsclicontrol-planeweb

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions