What Kairos does by itself
GitHub Actions limits
A daily dollar limit for each repository's GitHub Actions — what is cancelled at the limit and what always runs, runs let through after it, when limits lift, and how spend is read.
GitHub Actions can cost a lot once agents open many branches a day. Kairos can hold each repository to a daily limit, in dollars at list price. It is off until you turn it on.
What happens at the limit
Kairos never switches a workflow off. It cancels only these runs, until 00:00 UTC:
- runs for a pull request;
- runs for a push to a branch that is not the default branch.
These always run: merges (the merge queue), manual runs, schedules, releases, tags, and pushes to the default branch.
You are told at 80% of the limit and at the limit. See Moments.
Runs after the limit
A repository can let a few more runs through a day after its limit: "Runs a day after the limit: one commit's checks, or a manual run." A run here is a commit's: every workflow one push or pull request update starts, so its checks finish together. The oldest waiting commit goes first. A manual run at the limit is never cancelled, but it counts as one of the day's runs after the limit.
Setting it up
Settings › GitHub:
- Connect GitHub: Kairos reads each repository's Actions spend with your GitHub CLI sign-in. Kairos never sees the token.
- Daily limit for each repository: turns the limits on.
- Each repository: the default, $10 a day unless you change it.
- A repository's own limit, or Default to go back.
The first-run steps offer it too: "Limit GitHub Actions spend". See Settings › GitHub and Setting up Kairos.
How spend is read
From GitHub's own usage report, at list price, every 15 minutes while the limits are on; a repository at its limit has its new runs looked for every 3 minutes. The report is about an hour behind and counts whole days in UTC, so a day can end a little above its limit. "Limits lift at 00:00 UTC."
With the limits off, nothing is read and nothing is cancelled. GitHub Actions shows the spend either way, once GitHub is connected.