Skip to content

Auto Rules

Lane Holloway edited this page Oct 21, 2026 · 2 revisions

Auto rules

Auto rules decide what Fast Lane does on its own: which items and triggers start or resume a session, and with what instructions, model, effort and permissions. Edit them on the Rules tab (4), or by hand under auto_rules in config.json (hand edits apply when Fast Lane restarts).

The Rules tab: rules in the order they're tried, with their filters, actions, model, effort and prompt

Rules also shape sessions you start yourself with enter, so a rule's prompt and permissions apply either way. Auto-run only decides whether the session starts without you.

Keys

Rules are keyed by kind and trigger:

  • A plain kind means opened: pull_request, issue, dependabot_alert, code_scanning_alert.
  • kind:trigger covers any other trigger: pull_request:checks_failed, issue:commented, pull_request:review_requested, …
"auto_rules": {
  "dependabot_alert": { "min_severity": "high" },
  "pull_request:checks_failed": { "authors": ["you"], "allow": ["edit", "update_pr"] }
}

What runs

  • No rules anywhere: every newly opened item on a repo with auto-run on starts a session. Other triggers don't, except the personal ones from the inbox.
  • Once rules exist: only the keys listed auto-run, and only for items that pass every filter on the rule. An empty rule {} accepts every item.
  • Personal triggers (review_requested, mentioned, assigned) follow the inbox's auto-run setting rather than the repo's, and run with an empty rule unless you give them one. Adding a rule for one of them lets you filter them or allow actions.
  • Items that don't match still appear on the Events tab for you to start by hand.

Several rules for one key

A key can hold a list of rules, tried in order; the first that accepts the item wins. This lets, say, Dependabot PRs get their own prompt and permissions ahead of a general PR rule:

"pull_request": [
  { "authors": ["dependabot[bot]"], "allow": ["edit", "update_pr", "comment", "merge"] },
  { "skip_drafts": true, "skip_authors": ["you"] }
]

On the Rules tab, J/K reorder rules under the same key. A single rule can be written as an object, as above.

Global and per-repo rules

Rules live in the global auto_rules or in a repo's own auto_rules. A repo with rules of its own uses only those: they replace the global rules for that repo entirely, they don't merge. On the Rules tab, [/] switches scope, c copies the global rules into a repo to start customizing them, and deleting a repo's last rule sends it back to the global ones.

Filters

All set filters must match. List filters match when any entry does. Comparisons ignore case.

Filter Kinds Matches
min_severity alerts Severity at least low, medium, high or critical. Code scanning's note, warning and error rank with low, medium and high.
labels PRs, issues Has at least one of these labels
skip_labels PRs, issues Has none of these labels
authors all Opened by one of these logins. Bots end in [bot], such as dependabot[bot].
skip_authors all Not opened by any of these logins
skip_drafts PRs Not a draft
skip_bots all Not opened by a bot account (Dependabot alerts count as bots)

Filters look at the item: who opened it, its labels. For a commented trigger on your own PR, authors: ["you"] means "comments on PRs I opened".

What the session gets

Editing a rule: filters, allowed actions, model, effort and prompt

Field Does
prompt Replaces the instructions for this kind and trigger. See Prompts.
model The model to run, such as claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5 or claude-fable-5-1, or an alias like opus. Replaces the default model.
effort low, medium, high, xhigh or max. Replaces the default effort.
allow Actions Claude may take without asking (below).

A session keeps its model, effort and actions across your replies. When a trigger resumes it under another rule, it switches to that rule's, or back to the defaults where that rule sets none.

Actions

Each allowed action pre-approves some tools for the session and tells Claude it needs no approval for that action. Anything else still comes to you as a dialog.

Action Lets Claude, without asking Pre-approves
edit Edit files and commit locally Edit, Write, git checkout/switch/add/commit
push_branch Push new branches git push
open_pr Open pull requests gh pr create
update_pr Push to an existing PR's branch, edit its title and description, mark it ready gh pr checkout, git push, gh pr edit, gh pr ready
comment Comment on issues and PRs, including replies in review threads gh issue comment, gh pr comment, gh api --method POST on this PR's review comments
label Add or remove labels gh issue edit, gh pr edit
review Submit PR reviews gh pr review
close Close issues and PRs gh issue close, gh pr close
merge Merge PRs gh pr merge
dismiss_alert Dismiss security alerts gh api --method PATCH on this repo's Dependabot and code scanning alerts

Whatever is allowed, Claude always asks before pushing to the default branch, force-pushing, or changing anything outside the repo. See Safety for what is enforced by permissions and what by instructions.

Clone this wiki locally