Channels
A channel connects Yak to another tool: Slack, Linear, Sentry, email, GitHub or Drone. Each channel creates a task, and the task runs as a turn in a thread (see Concepts). To see where your channels stand, open Settings > Channels.
Scope. The channel driver interfaces (InputDriver, NotificationDriver, CIDriver, CIBuildScanner) cover task workflows. PR review and branch deployments integrate with GitHub directly and do not go through a channel driver.
Every external integration in Yak is a pluggable channel. A channel can fill up to three roles:
| Role | What it does | Example |
|---|---|---|
| Input | Creates tasks from external events | Slack @yak mention, Linear label, Sentry alert |
| CI | Reports build results back to Yak | GitHub Actions, Drone |
| Notification | Posts status updates and results | Slack thread reply, Linear comment, PR comment |
Channels are enabled by the presence of credentials. No credentials, no channel. Yak detects which channels are active at boot and only registers routes, webhooks and MCP servers for active channels. Disabled channel routes return 404.
The routing rule is simple: respond where you were asked. If a task comes from Slack, results go back to Slack. If it comes from Linear, results go back to Linear. Tasks started with yak:run or from Sentry post results to the PR only.
Which Claude account a channel uses
Section titled “Which Claude account a channel uses”A thread runs on one Claude account (see Claude accounts). For a channel-started task, Yak looks for the person who started it:
- Email and Linear (when the issue’s creator has a Yak user with the same email address) use that person’s default account for the repository, then their overall default.
- Slack, Sentry, GitHub comments and other work nobody started in Yak run on the repository’s unattended account, then the global Yak account. Set the unattended account in the repository’s Accounts section.
A follow-up in the same conversation stays on the thread’s account.
What a reply does while Yak is working
Section titled “What a reply does while Yak is working”| Channel | A reply while Yak is working |
|---|---|
| Slack | Before the PR exists, a thread reply is queued and Yak reacts to it. When the run succeeds, all queued replies become one follow-up. After the PR is open it is a follow-up (see Slack follow-ups). |
| Linear | Not queued. Reply in the agent session once the PR is open, and the reply becomes a follow-up. Before that, Yak answers that there is nothing to follow up on. |
| GitHub | A /yak comment starts a follow-up after a 60 second batching window. A review on Yak’s PR, or a /yak summon on any PR, while a run is active is queued behind it and Yak says so. |
| Replies in a thread that already started a task are ignored. |
A follow-up that starts while another turn is running on the same thread waits for that turn to end, then runs as the next turn. Only the dashboard can steer a running turn mid-work (see Threads). Channel replies never do.
Channel Summary
Section titled “Channel Summary”| Channel | Roles | Required | Where usage begins |
|---|---|---|---|
| GitHub | CI (Actions), notification (PRs) | yes | Always on |
yak:run command | Input | yes | Always on |
| Slack | Input, notification | no | Bot mention |
| Linear | Input, notification | no | Assign issue to Yak |
| Sentry | Input | no | Alert rule |
| Input | no | Forward an email to Yak | |
| Drone CI | CI | no | Polled by yak:poll-drone-ci |
The minimum viable setup is GitHub + the yak:run command. Everything else is optional.
GitHub (required)
Section titled “GitHub (required)”GitHub is the only channel Yak cannot run without — it needs it to push branches and open PRs.
Roles: CI (via Actions), notification (PR bodies and comments), input (follow-up commands on open PRs).
The Ansible provisioner creates a GitHub App automatically. You provide github_org in vault; Ansible handles app creation, installation, and credential storage.
If you already have a GitHub App and want to reuse it, fill in github_app_id, github_app_private_key, and github_webhook_secret in ansible/vault/secrets.yml before running the playbook.
Permissions
Section titled “Permissions”| Permission | Access |
|---|---|
| Contents | Read & Write (push branches) |
| Pull requests | Read & Write (create PRs, add labels) |
| Issues | Read & Write (react to follow-up comments) |
| Checks | Read & Write (CI results, the yak / config check) |
| Actions | Read & Write (flaky-test scan and CI failures read job logs; a failed run gets one re-run of its failed jobs) |
| Metadata | Read (default) |
User sign-in for co-owners
Section titled “User sign-in for co-owners”The co-owner gate (see Repository config) needs to know which GitHub account belongs to which Yak user. People link their account from Settings > Profile, in the “GitHub account” card, through the GitHub App’s user authorization. Yak stores only the GitHub id and login, not a token.
Setup:
- In the GitHub App settings, set the Callback URL to
https://<your-yak-domain>/settings/github/callback. Apps created from Yak’s manifest get this automatically. Leave “Request user authorization (OAuth) during installation” off. - Under Client secrets, click Generate a new client secret. Copy it right away, GitHub shows it once.
- Copy the Client ID from the top of the same page.
- Set both values and re-run the playbook. In
ansible/vault/secrets.yml:
github_app_client_id: "Iv1.abc123"github_app_client_secret: "..."The playbook writes them to the container environment as YAK_GITHUB_APP_CLIENT_ID and YAK_GITHUB_APP_CLIENT_SECRET. Outside Ansible, set those two variables directly (see .env.example).
Without them the Connect GitHub button cannot complete, so nobody links an account and no co-owner can be asked.
Webhook Events
Section titled “Webhook Events”The GitHub App subscribes to:
check_suite.completed: CI result processingworkflow_job.completed(Workflow jobs): spots GitHub Actions jobs that fail on several branches for a shared cause, so Yak can open one PR to fix itpull_request.closed: merge/close tracking (also denormalizes ontopr_reviews)pull_request.opened/ready_for_review/reopened: triggers a full PR review whenpr_review_enabledis onpull_request.synchronize: refreshes the branch preview and re-runs theyak / configcheck. It does not trigger a reviewpull_request.review_requested: re-requesting review from the Yak bot triggers an incremental PR reviewissue_comment.created:/yakfollow-up comments on an open PR (see Follow-ups below)pull_request_review.submitted: review feedback on Yak’s PRs, and/yaksummons in reviews and inline comments on any PR (see Follow-ups below)pull_request_review_comment.created:/yakfollow-up replies on an inline review comment (the file, line, and diff hunk are passed to Yak as context)push: refreshes branch preview deployments and re-reads.yak/when the default branch movesdelete: tears down branch preview deploymentsrepository.renamed/repository.transferred: keeps Yak’s record of where the repo lives on GitHub current
Webhook URL: https://{your-domain}/webhooks/ci/github for CI; https://{your-domain}/webhooks/github for PR review and follow-up events.
Subscribing an existing app. Freshly provisioned apps include these events and permissions via the Ansible manifest. If you reuse a pre-existing GitHub App, add Workflow jobs (or shared CI failures go unnoticed), Issue comments, Pull request reviews, and Pull request review comments to its event subscriptions (or follow-ups won’t fire) and bump Issues to Read & Write (or the 👀 acknowledgement on PR conversation comments will 403). GitHub will prompt installations to re-accept the new permission.
Accepting new permissions
Section titled “Accepting new permissions”Checks (Read & Write) and Members (Read) are new. Every installation has to accept them once, from the GitHub App’s installation page in your organization settings. Until an installation does, Yak skips the yak / config check on that installation and logs a warning. Everything else keeps working. Apps that reuse a pre-existing GitHub App also need the Push, Delete and Repository events subscribed. See Repository config for the check itself.
Repository renames
Section titled “Repository renames”A repository’s slug is Yak’s internal identity: it is the foreign key for tasks, the base of preview hostnames, the sandbox template alias, and the on-disk clone path. It never changes.
Where the repository lives on GitHub is tracked separately, in github_repo_id (immutable) and github_full_name (owner/name). Inbound webhooks resolve by repo id first, then by GitHub name, then by slug. A repository.renamed or repository.transferred event updates the GitHub side in place, so nothing else has to move.
If a rename happened while the app was not subscribed to the repository event, heal the record after the fact:
php artisan yak:sync-github-repo-identity --dry-run # previewphp artisan yak:sync-github-repo-identityGitHub redirects requests for a repository’s old path, so the stale name Yak holds is enough to rediscover the current one.
If your repos use GitHub Actions for CI, set ci_system: github_actions in the repo definition. Nothing else is required — the GitHub App receives check suite events automatically.
When a workflow run fails, Yak first re-runs its failed jobs once on the same commit, so a flaky test does not cost an agent retry. Only a job that fails twice counts as a CI failure. The retry prompt then includes the lines of each failed job’s log leading up to the error.
Important: the GitHub App must NOT be in your branch protection bypass list. Risk-based review approval is an explicit per-repository opt-in; Yak still has no merge authority.
Follow-ups
Section titled “Follow-ups”Once Yak has opened a PR, you can keep refining it without a local checkout. Comment on the PR (or reply to an inline review comment) with a /yak prefix:
/yak also handle the empty-file case/yak the error message should mention the row numberYak reacts 👀 on the comment to acknowledge receipt, runs a follow-up turn in the same thread, applies the feedback and pushes follow-up commits to the same branch. It then posts a result comment when the push lands. CI re-runs and the existing auto-retry applies. The follow-up shows as a chained task under the original on the dashboard.
- Trigger prefixes are configurable via
YAK_FOLLOWUP_GITHUB_PREFIXES(default/yak,@yak-bot[bot],yak:, case-insensitive). A comment without a prefix is ignored. - Bursts are debounced. Multiple comments within
YAK_FOLLOWUP_GITHUB_BATCH_WINDOW_SECONDS(default60) are collapsed into a single follow-up run, so a flurry of review notes produces one coherent revision rather than racing pushes. - Inline review comments carry their file, line, and surrounding diff hunk into the instruction, so “this variable name is confusing” lands with the context Yak needs.
- Merged or closed PRs decline politely and point you at a fresh issue or task — follow-ups only work while the PR is open.
On PRs Yak did not open
Section titled “On PRs Yak did not open”The same prefix works on a pull request a person opened, in a registered and active repository. A reply under one of Yak’s review findings is the common case:
/yak fix this pleaseYak reacts 👀 and replies in the same thread with a link to the task. It then commits on top of the PR’s own branch. For a reply in a thread, Yak also gets the comment you replied to, so a short request like “fix this” reaches it together with the finding it refers to.
These runs differ from follow-ups on Yak’s own PRs:
- Only a prefixed comment triggers work. Yak reviews many human PRs; a plain review or comment without the prefix does nothing.
- Yak never rewrites your branch. It adds new commits only. If you pushed while it worked, it rebases its commits onto yours and does a plain push. It never force-pushes, and it never edits the PR description.
- Yak replies and stops. When the push lands it replies with a summary and a link to the commit. It does not wait for CI or retry on a CI failure. From there the branch is yours.
- Yak always answers. If it cannot act, it replies with the reason: the PR comes from a fork, the PR is closed, the repository is not set up in Yak, or the branch name has characters Yak will not use in a shell. A second request while a run is in progress is queued, and Yak says so.
- Review triage must be on. Inline summons arrive through the review event, so they need
YAK_FOLLOWUP_GITHUB_REVIEW_TRIAGE(on by default).
The yak:run command (always available)
Section titled “The yak:run command (always available)”yak:run is an artisan command on the Yak server. It creates a task from the command line, with no configuration. It is not the yak command you install on your own computer: for that, see CLI.
# Run a task against the default repodocker exec yak php artisan yak:run TICKET-123 "Fix the broken CSV export"
# Run against a specific repodocker exec yak php artisan yak:run TICKET-456 "Fix timeout on batch endpoints" --repo=api
# Research task (no code changes, produces an HTML findings page)docker exec yak php artisan yak:run TICKET-789 "Audit deprecated field usage" --research --repo=api
# Run in the foreground so you can watch progressdocker exec yak php artisan yak:run TICKET-001 "Add README comment" --syncThe full signature:
yak:run {id} {description} [--repo=] [--context=] [--research] [--sync]Results post to the PR (fix tasks) or to the task’s dashboard page (research tasks). There is no originating channel to post back to.
Slack (optional)
Section titled “Slack (optional)”Roles: Input (task creation via @yak mention or a direct message to Yak, follow-ups via thread replies), notification (thread replies).
-
Create a Slack app at api.slack.com/apps
-
Enable Event Subscriptions with request URL
https://{your-domain}/webhooks/slack -
Subscribe to bot events:
app_mentionmessage.channels(needed for thread replies — clarification answers and follow-ups)message.im(lets people DM Yak a task instead of mentioning it in a channel)app_home_opened(powers the welcome DM the first time a user opens Yak’s App Home)
-
Enable the App Home tab (under App Home in the Slack app config). The tab itself can stay default — Yak uses the open event to DM the user, not to publish a Home view. On the same page, enable the Messages Tab and tick Allow users to send Slash commands and messages from the messages tab, so people can DM Yak.
-
Enable Interactivity & Shortcuts with request URL
https://{your-domain}/webhooks/slack/interactive— powers click-to-answer buttons on clarification messages. -
Add bot scopes:
chat:writeapp_mentions:readchannels:historyim:history(lets Yak read direct messages sent to it)reactions:write(lets Yak apply status reactions to your @mention)users:read(required: Yak looks up every sender to ignore guests and people outside the workspace, and shows the requester’s name on the task)users:read.email(lets Yak find a person’s Slack account by their Yak email, for direct messages)
-
Install the app to your workspace
-
Add the following to
ansible/vault/secrets.yml:slack_bot_token: xoxb-...slack_signing_secret: ...slack_workspace_url: https://{your-workspace}.slack.com # for dashboard → thread deep linksslack_alert_channel: C0123ABCD # channel ID for health check alerts -
If you set
slack_alert_channel, invite the bot to that channel (/invite @yak) -
Re-run Ansible
Health Check Alerts
Section titled “Health Check Alerts”The scheduler runs yak:healthcheck every 15 minutes. When a check fails, Yak posts the failure and the number of queued agent jobs to the channel in slack_alert_channel. It uses the same bot token, so no extra scopes or credentials are needed.
- Each failing check alerts at most once per 24 hours, even if it flaps. A check that is still failing a day later alerts again as a reminder.
- When every check passes again, Yak posts one recovery message per alert.
- A rejected or expired Claude account is reported separately, to the account’s owner. See Claude accounts.
@yak fix the broken CSV export@yak in api: fix the timeout on batch endpoints@yak research: which endpoints still use the deprecated `accuracy_type` field?@yak helpYak responds in the same thread with a Block Kit card: a personality line, context chips (repo, mode, task id) and action buttons (View task, View PR).
- Reactions. Yak reacts on your original @mention as the task progresses: 👀 when picked up, 🚧 while working, ✅ when a PR is ready, ❌ on failure. You can see status at a glance without opening the thread.
- Direct messages. You can also DM Yak the same text without the
@yakprefix (in api: fix the timeout on batch endpoints). Yak replies in a thread on your message, and replies in that thread work like replies in a channel thread. - Who can trigger Yak. Only full members of the workspace Yak is installed in. Yak ignores guests and Slack Connect users from other organizations everywhere: mentions, thread replies, DMs and clarification buttons.
@yak help. Sending@yak,@yak help, or@yak ?returns a capabilities card with syntax examples — it does not create a task.- First-time intro. The first time a given user gets a reply from Yak, the acknowledgment has a small “First time seeing me?” footer pointing to this doc. It only appears once per user.
- App Home welcome. The first time a user opens Yak’s App Home tab in Slack, Yak DMs them a welcome card with syntax examples and links. Requires the
app_home_openedevent subscription above. - Direct ping on status changes. When Yak needs an answer, still needs one a working day later, opens a PR, fails, or someone else cancels the task, it @-mentions the requester (and, on a follow-up, the person who replied) so they get a push. Progress ticks and expiry don’t ping. Tasks started from Linear or the dashboard get the same events as a direct message from the Yak bot; a responsible person who did not start the task hears only when the PR is ready. Add
users:read.emailand reinstall the app for direct messages. - Start-of-work progress. When the worker picks a task up, Yak posts a short in-thread message (“Starting on
{repo}— exploring the codebase now.”). Closes the silent gap between ack and first push. Disable withYAK_EMIT_START_PROGRESS=falseif you find it noisy. - Click-to-answer clarification. When Yak asks a clarification question, each option is a Block Kit button. Clicking one is the same as replying in the thread: Yak stores the answer and continues the thread. Requires Interactivity & Shortcuts to be enabled in the Slack app config (step 5 above).
Clarification Flow
Section titled “Clarification Flow”Any task run (fix tasks from Slack, Linear, Sentry, flaky tests or the dashboard, PR follow-ups, and research) may end with structured questions. If a request is ambiguous, Claude Code reads the codebase and posts 2—3 specific options grounded in what it found:
I want to make sure I fix the right thing. Which did you mean?
1. Fix the XLSX parse failure on files with merged header cells2. Fix the timeout on uploads over 50k rows3. Fix the auto-detect picking "Street 2" over "Street"
Reply with a number and I'll get started.The task pauses in awaiting_clarification. Reply in the thread with a number and Yak continues the same thread, with no re-reading and no re-analysis. A single question in Slack or Linear can be answered inline in the thread (Slack shows one button per option). Several questions, or any question from GitHub or the dashboard, are answered on the question card on the thread, and Yak posts a link to it. An unanswered question is closed after three working days (see the Slack gotchas).
Follow-ups
Section titled “Follow-ups”After Yak has opened a PR, replying in the same Slack thread keeps the conversation going. A reply on a task with an open PR is feedback: Yak runs a follow-up turn in the same thread, applies your message, pushes commits to the same branch and replies in the Slack thread when the push lands. No new mention is required. If the PR is merged or closed, Yak says so and asks you to start a new request. A reply while the task is held for a co-owner also becomes a follow-up. A reply to a finished research task asks a follow-up question.
Before the PR exists, a reply while Yak is working is queued (Yak reacts to it) and all queued replies are delivered together as one follow-up when the run succeeds.
Thread matching is the same mechanism that routes clarification answers, so it relies on the channels:history scope.
Messages about held changes and previews
Section titled “Messages about held changes and previews”Two kinds of Slack messages need no setup beyond the bot token. When a change is held for a co-owner, Yak replies in the task’s thread and sends direct messages to the people it asks (see The co-owner gate). When a preview fails, Yak messages the affected authors and, if YAK_SLACK_FEED_CHANNEL holds a channel ID with the bot invited, posts repair news there (see Previews).
Gotchas
Section titled “Gotchas”- Channels history scope is required for thread reply matching. Without it, clarification replies and follow-ups cannot be routed to the correct task.
reactions:writemust be granted for status reactions to appear. Without it, reactions silently fail; everything else still works.app_home_openedevent must be subscribed for welcome DMs. Enable the App Home tab in the Slack app config even if you never customize it — the event only fires when the tab is enabled.- Bot token rotation requires re-running Ansible to update the container env vars.
- Three working days to answer. Yak sends one reminder after a working day and closes an unanswered clarification after three working days. Saturday and Sunday don’t count.
- Use a channel ID for
slack_alert_channel, not a name, and invite the bot first. Without it, or if Slack rejects the post, no alert is sent; the command logs aHealth check Slack notification failedwarning and retries on the next run. slack_workspace_urlis optional but recommended. Without it, the dashboard’s “Source: Slack” chip renders as plain text instead of linking back to the originating thread.
Linear (optional)
Section titled “Linear (optional)”Roles: Input (task delegation via Linear Agents), notification (agent session activities, issue state transitions).
Yak installs into a Linear workspace as an Agent: a first-class workspace participant that appears in the assignee picker without consuming a seat. Delegating an issue to Yak opens an agent session on the issue; Yak posts its thoughts, actions, and final result as typed activities inside that session.
-
Register the OAuth Application at Linear → Settings → API → Applications → New application.
- Name:
Yak - Callback URL:
https://{your-domain}/auth/linear/callback - Enable Webhooks, set the URL to
https://{your-domain}/webhooks/linear, and under App events tick Agent session events. Under Authorization events, tick OAuth authorization events if you want to track installs. - Copy the app’s webhook signing secret.
- Name:
-
Add the following to
ansible/vault/secrets.yml:linear_oauth_client_id: lin_api_...linear_oauth_client_secret: lin_oauth_...# Defaults to https://{yak_domain}/auth/linear/callback if omitted.linear_oauth_redirect_uri: ""linear_webhook_secret: lin_wh_... -
Re-run Ansible to push the credentials into the container.
-
Authorize the app: sign in to the Yak dashboard → Settings → Linear → Connect Linear. Approve the consent screen — it requests scopes
read,write,app:assignable, andapp:mentionable. A workspace admin must approve the install.
Once installed, Yak appears in the Linear assignee picker for every team it belongs to. Team membership is managed inside Linear — an admin adds or removes the Yak agent per team like any other user.
Assign any Linear issue to Yak. For research-only tasks, either (a) include the word “research” anywhere in the issue title (e.g. Research: audit deprecated field usage or [research] memory leak investigation), or (b) add a research label to the issue. Label matching is case-insensitive. Use the label when the title naturally reads like a fix (“Replace AWS Inspector…”) but the task is actually investigative — it’s lower-friction than rewriting the title.
Delegation opens an agent session on the issue. Yak immediately posts an acknowledgement activity, then emits progress updates as it works. When the run finishes:
- Fix tasks — Yak posts a
responseactivity linking to the pull request and moves the issue to the team’s review state (see Issue State Management). - Research tasks — Yak posts the findings and moves the issue to “Done” when a done state is configured.
- Wrong repository — when routing is unsure, or the agent finds the request belongs to another repository, Yak asks in the session which repo to work in and lists the options. Reply with a number or a repo name and Yak restarts the task there.
- Failures — Yak posts an
erroractivity explaining what went wrong; the issue state is left alone.
Follow-up messages inside the agent session are supported. Once a PR is open, commenting in the session is feedback: Yak runs a follow-up turn in the same thread, applies your message and pushes commits to the same branch (see Follow-ups below). If the PR has already merged or closed, Yak declines politely and points you at a fresh issue.
What you’ll see during a run
Section titled “What you’ll see during a run”- Acknowledgement (sync). Posted during the webhook response, before the 10-second SLA. Runs through Yak’s personality agent with a short timeout, so the voice matches later messages — if the LLM is slow or unreachable, it falls back to a static template but still sounds like Yak.
- Start-of-work progress. As soon as the worker picks the task up (often seconds later), Yak posts a
thoughtactivity describing what it’s about to do. Closes the silent gap between pickup and first push on longer tasks. Controlled byYAK_EMIT_START_PROGRESS— default on. - Push + CI. Once the agent has changes, Yak pushes to a branch and posts another progress activity noting CI is running.
- Final response. On success, a
responseactivity with the PR link; on failure, anerroractivity with the reason. - Multi-turn replies. Commenting inside the agent session is state-aware: while Yak is
awaiting_clarificationyour reply answers the question; once a PR is open it becomes a follow-up that pushes more commits; astopsignal cancels the in-flight task; and a merged/closed PR gets a polite decline.
Follow-ups
Section titled “Follow-ups”After the PR is open, post a comment in the agent session with your refinement. Yak posts a thought ack, runs a follow-up turn in the same thread, pushes to the same branch and posts a response when the push lands. CI re-runs through the existing auto-retry, and the follow-up appears as a chained task under the original on the dashboard. A comment before the PR exists is not queued: Yak answers that there is nothing to follow up on, so send it once the PR is open. Unassigning the issue from Yak cancels any in-flight work.
Repo Detection
Section titled “Repo Detection”Linear issues use the routing rules in Repositories: an explicit mention in the issue body (in my-cli: or repo: my-api), then the single active repository, then the description router. If it is still unclear, Yak asks in the agent session (see Usage above).
Linear projects are not mapped to repos. Issues often span projects, so a hard mapping is too limiting.
Issue State Management
Section titled “Issue State Management”Yak manages the Linear issue’s workflow state throughout the task lifecycle:
| Event | Issue state |
|---|---|
| Task picked up | → In Progress |
| PR opened (CI green) | → In Review |
| Research completed, or answered without a PR | → Done (only when linear_done_state_id is set) |
| Task failed | remains In Progress with a failure activity |
Automatic states. With the “Move issues to In Progress and In Review” toggle on (Settings, Linear), no configuration is needed. Workflow states are per team in Linear, so Yak looks them up on the issue’s team. On pickup it moves the issue to the team’s leftmost started-type state. When it opens a pull request it moves the issue to the team’s leftmost started-type state whose name contains “review” (case-insensitive). Linear fixes the state types but not their names, so a team whose review state has no “review” in its name should set an explicit id. If the team has no matching state, the issue is left where it is.
Explicit states. linear_started_state_id (YAK_LINEAR_STARTED_STATE_ID) and linear_in_review_state_id (YAK_LINEAR_IN_REVIEW_STATE_ID) take precedence over the automatic lookup. linear_done_state_id and linear_cancelled_state_id have no automatic fallback and only apply when set. A task with a pull request is never moved to Done by Yak, since a person still has to review and merge it. Configure the state UUIDs in ansible/vault/secrets.yml.
Gotchas
Section titled “Gotchas”- Delegation is the trigger. Yak only acts on the initial
AgentSessionEvent.createdfrom delegation. Re-assigning an already-Yak issue does not re-trigger. - Research mode triggers on either the title or a
researchlabel. Label changes made after the session is created don’t re-route the task (session type is decided at creation time) — but labels present at creation are read from the webhook payload and honoured. - Admin install required. The
app:assignableOAuth flow requires a workspace admin to approve. Non-admin installs fail at the consent screen. - 10-second SLA. Yak posts an acknowledgement activity synchronously during the webhook response to avoid Linear marking the session unresponsive. If the Linear API is slow, that ack may time out — the run still proceeds.
Sentry (optional)
Section titled “Sentry (optional)”Roles: Input (task creation from alert webhooks).
-
Create an internal integration at Settings → Developer Settings → Internal Integrations
-
Permissions required: Organization: Read, Project: Read, Issue & Event: Read. Organization+Project read are what lets the Add Repository form populate the Sentry project dropdown — skip them and the form silently falls back to a plain slug text input.
-
Set the webhook URL:
https://{your-domain}/webhooks/sentryand turn on Alert Rule Action. Leave the webhook subscriptions (Issues, Errors, …) unchecked; Yak only handles alert-rule deliveries -
Create an issue alert rule whose action notifies this integration. The rule is the opt-in: whichever issues it fires on are the ones Yak considers. Put frequency, priority, and event-count conditions on the rule itself
-
Map Sentry projects to repositories via the
sentry_projectfield on each repo (see the Repositories page) -
Add to
ansible/vault/secrets.yml:sentry_auth_token: ...sentry_webhook_secret: ...sentry_org_slug: your-org -
Re-run Ansible
Filtering
Section titled “Filtering”The alert rule decides which issues reach Yak. The alert payload carries a single event, not issue aggregates such as event count, so volume thresholds belong in the rule’s conditions. Yak only drops classes of error that never have a code fix:
| Filter | Rejected |
|---|---|
| CSP violations | Culprit matches font-src, script-src-elem, script-src-attr, style-src-elem, connect-src, img-src, media-src, default-src. Title starts with “Blocked”. |
| Transient infra errors | RedisException, Predis\*Exception, php_network_getaddresses, context deadline exceeded, Connection refused, Operation timed out. |
| Deduplication | The UNIQUE(external_id, repo) constraint on tasks rejects repeat issues. |
Gotchas
Section titled “Gotchas”- Inactive repos are skipped. If
sentry_projectpoints to a repo whereis_active = 0, the webhook is silently dropped. - Map every project. Yak matches an alert to a repository by
sentry_project. With no match it uses the single active repository, then the description router, then the default repository (see Repositories). It never asks in Slack, so map each project explicitly. - Rejections are logged, not silent. Every filtered issue writes a
Sentry issue filtereddebug line to theyaklog channel with its reason and the event’s tag keys. Start there when an alert you expected never became a task. - Optional per-event opt-in. Set
YAK_SENTRY_REQUIRED_TAG(e.g.yak-eligible) to additionally require that tag key on the event. Off by default — the tag has to be set in application code at the moment the error is thrown, so the alert rule is usually the better place to decide eligibility.
Email (optional)
Section titled “Email (optional)”Roles: Input (task creation from forwarded emails). One-way: Yak sends a single acknowledgment and every later step happens in the Yak UI and the starter’s Slack direct messages.
Forward an email to Yak’s inbound address with a note on top (“Figure out why the error consumption is so high, and whether it’s in the geocodio repo”). Yak creates a task: the note is the instruction, the forwarded email and its attachments are the context. Repo detection and the fix or research choice use the note only, with the same in <repo>: and research: syntax as Slack. When the repo is unclear the task waits for a pick, and the acknowledgment links straight to it.
-
Create a Postmark server.
-
Inbound: in the server’s inbound stream, set the inbound domain (for example
yak.example.com) and add an MX record on that host pointing toinbound.postmarkapp.com. Set the inbound webhook URL tohttps://yak:<password>@{your-domain}/webhooks/email, with a long random password, and turn on Include raw email content in JSON payload. Yak verifies DKIM on that raw message; without it every email is rejected. -
Outbound: verify the sending domain in Postmark (DKIM and Return-Path DNS records). Acknowledgments and address confirmations send from the outbound stream.
-
Add to
ansible/vault/secrets.yml:email_webhook_password: ... # the password in the webhook URLemail_inbound_address: yak@yak.example.compostmark_api_key: ... # server API token; also switches MAIL_MAILER to postmark# email_reply_to: no-reply@yak.example.com (defaults to no-reply@ the inbound domain)# postmark_message_stream_id: outbound -
Re-run Ansible. The health page’s Email row turns green once a real mailer is set.
Who can send
Section titled “Who can send”Every Yak user can forward from their sign-in address. Extra addresses (a personal mailbox, a second domain) are added under Settings, Profile, Email to Yak. Yak emails a confirmation link to the new address, and the owner must open it while signed in to Yak before the address counts.
A message is accepted only when all of these hold, checked in this order:
| Check | Dropped as |
|---|---|
Webhook basic auth matches email_webhook_password | 403 |
The From header names exactly one address | malformed |
| The inbound address is the envelope recipient or in To, Cc, or Bcc (so replies to the no-reply address never loop back in) | wrong_recipient |
Not an automatic or bulk message (Auto-Submitted, Precedence: bulk/list/junk) | auto_submitted |
| The From address is a sign-in or confirmed address | unknown_sender |
The raw message has one From header naming the sender, no duplicated To, Cc, or Subject, and a DKIM signature that Yak verifies itself (app/Channels/Email/dkim_verify.py, dkimpy): d= exactly the From domain, no l= tag, signing From and the To or Cc header that names Yak. The last rule stops someone from replaying a signed email a team member once sent them. | dkim_failed |
| The Message-ID has not been seen before | duplicate |
| It does not reply to a message that already started a task, or to a Yak acknowledgment | thread_follow_up |
| The sender has created fewer than 30 tasks in the last hour | rate_limited |
Every drop answers 200 (so Postmark does not retry), is logged to the yak channel, and appears on the Observations page as email.<reason>. Yak never replies by email to a dropped message, because the sender may be forged. When a forward from a known address fails the DKIM check, the address’s owner gets a Slack direct message instead (at most one per address per hour).
Gotchas
Section titled “Gotchas”- CC works once; BCC does not work. CC Yak on a thread and the first message Yak sees starts a task; later replies in that thread are ignored. A BCC is rejected, because no signed header names Yak.
- Attachments. Up to 20 files, each up to 25 MB, become task attachments. Images under 10 KB (signature logos, tracking pixels) are skipped.
- Local testing. Set
YAK_EMAIL_REQUIRE_DKIM=falseto post hand-made payloads without a signature. Never turn it off in production. The check needspython3with dkimpy (Debian packagepython3-dkim, included in the Docker image) and outbound DNS to look up signing keys.
Drone CI (optional)
Section titled “Drone CI (optional)”Roles: CI (build result reporting).
-
Add to
ansible/vault/secrets.yml:drone_url: https://drone.yourcompany.comdrone_token: ... -
Set
ci_system: droneon repositories that use Drone -
Re-run Ansible
Drone has no outbound webhooks, so Yak polls the Drone API on a schedule (see below). No webhook configuration is required on the Drone side.
Yak supports both Drone and GitHub Actions simultaneously — each repo specifies which CI system is authoritative via the ci_system field. During a migration from Drone to GitHub Actions, update repos one at a time.
How It Works
Section titled “How It Works”- Yak pushes the branch
yak/{external_id} - Drone triggers a build on the branch
yak:poll-drone-ciruns every minute and calls the Drone API for each task inawaiting_cion aci_system=dronerepo- When the latest build on the task’s branch settles to
success,failure,errororkilled, Yak processes the result - On green, Yak creates the PR. On red, Yak retries once or marks the task failed.
Gotchas
Section titled “Gotchas”- Poll cadence. CI results surface within ~60s of the Drone build settling. Builds still running are skipped until the next tick.
- Retry race. After a retry pushes a new commit on the same branch, the poller ignores any Drone build that started before the task re-entered
awaiting_ci(with a 60s grace period). - Retries use force push to the same branch — the PR shows only the final attempt.
Adding A New Channel
Section titled “Adding A New Channel”Channels are pluggable. Adding a new input source means implementing three interfaces in app/Channels/Contracts/:
InputDriver— parse an incoming event, return a normalized task descriptionCIDriver— parse a build result webhook, return pass/fail plus failure outputNotificationDriver— post status updates back to the source
See Development: Adding A Channel for the interface reference and a worked example.