Start agents from Slack

On this page
  1. Connect a Slack workspace
  2. Link your Slack account
  3. Start a session
  4. Follow up and answer
  5. What agents read, and never read
  6. Settings
    1. What a workspace allows
    2. How agents write in Slack
    3. Channels
    4. What a project does
    5. Yours
  7. Notifications in Slack
  8. Transcripts
  9. Limits
  10. Not supported yet
  11. Troubleshooting

Mention fctl in a Slack thread, write to it in its messages, or send it a message with Send to fctl…, and an agent starts on the work as you: in a sandbox on your team's runners, on your Claude subscription. Its card in the thread says how it goes and changes in place as it does, your replies there steer it, its questions come with a button for each answer, and the last message of each of its turns comes back where you asked. Agents read the thread they started from, and public channels only where your workspace's admins make them readable: never the rest of a private channel, and never anyone else's messages with fctl.

fctl's Slack app works on app.fctl.sh and on instances people host themselves alike (Self-hosting). This page is for the people who use it and the admins who connect it; Architecture says how it works, and ADR 0104 why it works that way.

#web-team
  Ada    @fctl the login redirect loops after a password reset: fix it, with a test   👀
    fctl  Fix the login redirect after a password reset
          ⚙ Running the tests
          web#12 · for Ada Lovelace
          2 of 3 done  ✓ Reproduce the loop  ▶ Fix the redirect  ○ Add a test
          ⤴ acme/web#45 Fix the login redirect · checks running
          [ Open in fctl ]
    fctl  🙋 The agent asked
          Should API clients keep the old redirect?
          Grace Hopper answered: Keep it for API clients
    fctl  I kept the old redirect for API clients and fixed it for the web, with a test…

The card is the first message of fctl's in the thread: the session's title, how it stands, its number and whom it runs for, the agent's plan (its todo list), its pull requests with their checks, and Open in fctl. It changes in place as the session moves. Only the agent's replies, its questions, and a pause or a failure post new messages, so that the thread stays readable.

Connect a Slack workspace

A workspace's admins connect it, on the workspace page's Integrations tab under Slack (Add to Slack), or with fctl workspaces slack connect. Slack asks to install fctl's app in one of your Slack workspaces: whoever Slack lets add apps there installs it, and where your Slack's admins approve apps, Slack asks one of them first. Back in fctl, the workspace works in that Slack workspace, and its people link their Slack accounts (below), you too.

Org-wide installs in Enterprise Grid, Slack Connect channels and guests aren't supported yet (below).

fctl starts sessions only for people it knows in a Slack workspace, as them. The first time you ask fctl there, it sends you a message only you see, with Link your Slack account: sign in with Slack, and your request starts by itself, with 👀 on your message. It waits an hour for you. To link it beforehand: Settings → Slack, or fctl account slack link.

Matching by address. An address in Slack proves nothing to fctl: a Slack workspace's admins can change people's addresses there. So app.fctl.sh knows people only by their link. A self-hosted instance whose people sign in to Slack and to fctl through the same provider can let workspaces know people by their address instead: its admins allow it under Admin → Slack (fctl admin slack --match-email on), and each workspace's admins turn it on for a Slack workspace (Know people by their verified address, fctl workspaces slack set --match-email on). Someone who hasn't linked an account is then the fctl account whose verified address is their Slack address, where that account is a member of a workspace that turned it on, unless they are a guest there. Their Settings → Slack shows the match. It lasts only while it is allowed: once the instance or every such workspace turns matching off, fctl forgets it the next time they ask, and asks them to link their account. A match is no sign-in, so it meets no sign-in rule: people a rule covers link their account, signed in as it asks.

Start a session

Where How Its card and replies go
A channel fctl is in, public or private Mention fctl with what to do, in a new message or in a thread: @fctl the checkout page 500s since this morning: find out why To that thread
fctl's messages (the app, in Slack's sidebar) Write to it what to do To that thread, a session of its own that only you see, with the agent's words as it writes them
A channel /fctl <what to do>; where you could start sessions in several projects, a form asks which To a new thread there, which fctl starts with what you asked; to your messages with fctl where it isn't in the channel
Any message in a conversation fctl can see Send to fctl… in the message's menu: a form with the message, a project and what to do To the message's thread, where fctl is in the channel and Post its card and replies in this thread stays ticked; else to your messages with fctl
fctl's Home tab, or the Start an fctl session shortcut Start a session: a project and what to do To your messages with fctl

/fctl status lists, only for you, what needs you and what runs, and the Home tab shows the same with your recent pull requests. Slack runs no app's slash commands in threads: mention fctl there instead.

Which project.

  1. In a channel its workspace's admins mapped to a project, that project: "Mentions in #web-team start sessions in web".
  2. Else the only project you can start sessions in, among the projects of the fctl workspaces that work in this Slack workspace and let such requests start sessions.
  3. Else fctl asks which, in a message only you see. A workspace's admin can tick Remember for #channel there, which maps the channel.

In your messages with fctl, it's the project you keep for them (Settings → Slack, fctl account slack dm-project web), else the only one, else your choice. You start sessions where you're an editor of the project, or more, as in fctl.

What the agent gets. What you wrote is its task: your instructions. The thread's earlier messages come with it (up to 50 of them, and 30,000 characters), and with Send to fctl… the message you sent and its thread, as information from the people who wrote them: the agent takes them as what the work is about, not as instructions, even where they ask for something. Mentions read as names, and links as their words and address. Files attached in Slack aren't passed on, and the agent sees a reply's files only by their names: send files in fctl instead (the session's page, fctl send -a), where they reach it.

The session is yours, as one you start in fctl: it runs on your Claude subscription, in the project's sandbox with its GitHub access, on a branch of its own, titled after the first line of what you asked, and you follow it. Webhooks say it started_by slack.

Follow up and answer

The card's status, in words:

The card says It means
Waiting for a runner It waits for a runner with room
Starting its sandbox Its sandbox starts
What the agent does ("Running the tests") The agent works: its plan and pull requests show below, with their checks
Waiting for your answer The agent asked something
Waiting for a reply Its turn ended
Done Its pull requests merged
Paused until … Its Claude subscription reached a usage limit: it carries on by itself then, a time Slack shows each reader in their own time zone
Failed: … Why, in a line; people who manage it resume it in fctl
Stopped: reply here to carry on Someone stopped it, or it stopped idle

What agents read, and never read

An agent never holds a Slack token. fctl slack in its sandbox asks fctl, which checks each conversation with Slack before it reads anything:

Agents read Agents never read
The thread their session started from, in a channel, a private channel or your messages with fctl Any other message of a private channel
The public channels your workspace's admins made readable, where their project reads them: a message and its thread, a channel's latest messages, and a search of them where the workspace allows it Anyone's messages with fctl, and group direct messages, other than their own session's thread
Channels shared with other organizations (Slack Connect)

They post only in their own thread: fctl posts the last message of each of their turns, and they post a quick word themselves (fctl slack reply), such as a link people asked for, where the workspace lets them. Whatever they write notifies nobody: @channel, @here, @everyone, user groups and people's mentions reach no one, and links don't unfurl into previews. In an hour, a session's agent reads Slack at most 120 times, searches it at most 30 times and posts at most 20 times. Review agents reach nothing in Slack.

The agent is told the same: people's replies reach it as their messages where they may message the session, and everything else from Slack is information from the people who wrote it. Outside your messages with fctl, it's told that everyone in the channel reads the thread, so that it posts no secrets there.

Settings

What a workspace allows

A workspace's admins choose, for each Slack workspace it works in, on the Integrations tab under Slack or with fctl workspaces slack set:

Setting Default What it does
Mentions in channels (--channels) on Mentions in channels, /fctl and Send to fctl… start sessions
Direct messages (--direct-messages) on Writing to fctl in its messages starts sessions, and so do its Home tab and the Start an fctl session shortcut
Search the readable channels (--search) on Agents search the readable channels, besides reading them
Agents' own replies (--agent-replies) on Agents post in their own thread with fctl slack reply; off, only fctl posts there
Notifications in Slack (--notifications) on People who choose Tell me in Slack get their notifications from fctl's app
Projects' events (--project-events) on Projects post the events they choose to a channel
Know people by their verified address (--match-email) off People who haven't linked an account are known by their address, where the instance allows it
Transcripts (--transcripts keep or drop) keep Drop them once a session ends: fctl drops what Slack's messages said from sessions' transcripts (below)
How agents write there (--instructions, --instructions-file) fctl's guidance What agents are told about the messages they post in Slack (below)

How agents write in Slack

A thread reads best a few lines at a time, so agents are told how to write what they post there: the last message of each of their turns, and their own replies. Until a workspace's admins change it, that's fctl's guidance, which changes with fctl:

People read your replies in a Slack thread, often on their phones: write a message, not a report.

- Lead with the answer or the outcome, in a sentence or two.
- Keep it to a few short lines, or a handful of bullets. No headings and no tables.
- Link to the pull request, the issue or the page rather than retelling what it says.
- Leave out the steps you took, the commands you ran and the files you changed, unless someone asks.
- When you need someone, say what you need from them, last.

Admins edit it on the Integrations tab, under Slack → What agents post → How agents write there: start from fctl's guidance, add a rule with a click (three sentences at most, the pull request first, plain words, no emoji, the asker's language), or write your own, up to 4,000 characters. Yours take the place of fctl's; Use fctl's guidance goes back to it, and an empty text tells agents nothing. It changes only what agents post in Slack, not what they write on GitHub, and sessions take it as they next start or resume.

fctl workspaces slack instructions                 # what agents are told now
fctl workspaces slack set --instructions "Answer in three sentences at most, then link the pull request."
fctl workspaces slack set --instructions-file slack.md
fctl workspaces slack set --instructions default   # fctl's guidance ("" for none)

Channels

The shell takes # at the start of a word for a comment, so give the CLI channels' names without it, or quote them ('#web-team').

What a project does

A project's owners and maintainers choose, in its settings under Slack or with fctl projects slack:

fctl projects slack -p web --events web-alerts
fctl projects slack -p web --events web-alerts --kinds session.failed,session.question
fctl projects slack -p web --events none

Yours

Settings → Slack lists your Slack accounts, links and unlinks them, and keeps the project your messages with fctl start sessions in (fctl account slack dm-project web, or --ask to choose each time).

Notifications in Slack

Turn on Tell me in Slack in Settings → Notifications (fctl notifications set --slack on), and fctl's app sends your notifications in your messages with it too: a session you follow finished its turn, asks you something, paused on a usage limit or failed. A question comes with a button for each answer, and a reply in a notification's thread reaches the session as your message. Each goes to the Slack workspace the session's workspace works in, where you linked your account and its admins let notifications go there. Several that come close together arrive as one list, at most one a minute, as in your browsers.

Transcripts

A session keeps what came from Slack in its transcript, as anything else there: the messages fctl passed on, the thread's earlier messages in its task, and what its agent read. A workspace that would rather not chooses Drop them once a session ends under Transcripts (fctl workspaces slack set --transcripts drop): within about an hour after a session ends (it stopped, failed or was archived), fctl replaces what each message from Slack said with who wrote it where, and what fctl slack read with a note that it was dropped, in the transcript and in search. A session that carries on later is dropped again once it ends. Claude's own conversation keeps them as long as the session keeps it: in its sandbox while its runner keeps that, and in its encrypted snapshot until the snapshot expires or the session is deleted (Session snapshots). What the agent wrote, its replies in Slack included, stays.

Limits

Not supported yet

Troubleshooting

You see Why What to do
Nothing when you mention fctl fctl isn't in the channel, or the instance takes no events from Slack Invite fctl, as Slack offers; an admin checks Integrations → Slack, which says when Slack's events don't reach the instance
"fctl doesn't know who you are yet" You haven't linked your Slack account Link your Slack account: your request starts once you do, within the hour
"there's no fctl project here you can start sessions in" No project you're an editor of, in a workspace that works in this Slack workspace and lets such requests start sessions (Mentions in channels, or Direct messages) A project's owners make you an editor, or the workspace's admins turn that on
"mentions here start sessions in Web, which you can't start sessions in" The channel maps to a project you aren't an editor of Its owners make you an editor of it
"connect your Claude subscription in fctl first" Sessions run on yours Settings → Claude, then ask again
"fctl couldn't start on this: …" What it says Reply in the thread to try again, within the hour
"Only the person who asked in this thread can start its session" Someone else's request waits there Mention fctl in a new thread
"you can't message this session in fctl" You may not steer it Its owners share it with you
"The fctl session failed, so your reply didn't reach its agent" It failed Resume it in fctl
"Slack's guests can't use fctl's agents here" You're a guest of the Slack workspace A member asks instead
"… requires its members to sign in with Google as their … address" You linked your Slack account signed in to fctl another way, or fctl knows you by your address Sign out of fctl, sign in with Google as that address, then Link your Slack account again: what you asked by mentioning fctl, writing to it or replying goes on then, and a form's you ask again
"fctl doesn't work in channels shared with other organizations (Slack Connect) yet" A Slack Connect channel Ask in one of your own channels, or in your messages with fctl
"fctl can't see this conversation" A private channel fctl isn't in, or someone else's direct messages: fctl can't tell whether it's shared with another organization, so it takes nothing from it Invite fctl to the channel (/invite @fctl), or write to fctl in your messages with it
"fctl couldn't post the agent's reply in the thread…", in your messages with fctl fctl was removed from the channel, or the channel was archived, after the session started there Invite fctl again to carry on in the thread; meanwhile the session's replies and questions come to you
Integrations → Slack says its access was revoked Slack uninstalled fctl's app or revoked its token: someone removed it, or the person who installed it left the Slack workspace or became a guest there An admin connects it again, which installs the app again
Connecting comes back with "That sign-in took longer than ten minutes", or "fctl doesn't take Enterprise Grid installs for a whole organization yet" The sign-in waited too long, or Slack installed the app for a whole Enterprise Grid organization Add to Slack again, and choose one Slack workspace
fctl slack says Slack limits how often fctl reads app.fctl.sh's limits, above The agent tries again a minute later