Every merge, review and CI run in your repositories arrives as an event.
Read them from a cursor, follow them live, wait on them from a script or have Sailfork post them to your URL, signed and retried.
48203 14:05 acme/shop#418 pull.review grace approved "ship it"
48204 14:06 acme/shop ci/run.pass - test.yml pass on welcome-code
48205 14:06 acme/shop#418 pull.merge ada merged Apply WELCOME10 once
id: 48205 event: merge data: {"id":48205,"at":"2026-11-22T22:06:41Z","repo":"acme/shop","number":418,"kind":"merge","action":"pull.merge","actor":"ada"}48206 14:06 acme/shop push ada refs/heads/main 3be07d5..91c4e0a
48207 14:07 acme/shop ci/run.pass - deploy.yml pass on main
A subscription remembers where you stopped, on any machine.
Save a filter under a name and read it with a stored cursor. A restarted agent picks up at the next event, with no gap and no repeat.
The event feedsailfork events --subscription ci-merges
- 4820303
- 4820404
- 4820505
- 4820606
- 4820707
- 4820808
- 4820909
- 4821010
- 4821111
- 4821212
cursor 48207
- Laptop, 14:07
- Agent on build-2, 14:20
- Laptop, 14:07:
- reads, then the cursor moves to 48207.
- Agent on build-2, 14:20:
- starts after 48207, repeats nothing.
The cursor never moves back, so a replayed advance cannot make a reader repeat an event.
Deliverieshttps://ci.acme.dev/hooks/sailfork
| Time | Event | State | Attempts | Last answer |
|---|---|---|---|---|
| 14:06:42 | pull_request merged | pending | 1 attempt | 503 in 412 ms next attempt 14:06:52 |
| 14:06:53 | pull_request merged | delivered | 2 attempts | 200 in 96 ms |
| Nov 21, 17:40 | pull_request opened | failed | 5 attempts | 500 in 1,870 ms Redeliver |
Waits between attempts: 10 seconds, 1 minute, 5 minutes, 30 minutes. An attempt with no answer in 10 seconds counts as failed.
A delivery that fails is retried, and a failed one can be sent again.
Repository admins get signed requests with a history of every delivery. Redeliver any of them with one call.
WebhooksA script can wait for the merge instead of writing its own polling loop.
sailfork wait returns when the state you named is true, and its exit code says whether it held.
| Command | Returns 0 when | Exits 1 when |
|---|---|---|
| sailfork wait pr 418 --checks | its checks finishExits 1: one fails or is cancelled | |
| sailfork wait pr 418 --merged | it is mergedExits 1: it is closed instead | |
| sailfork wait pr 418 --review | a new review or comment arrivesExits 1: the review asks for changes | |
| sailfork wait pr 418 --conflicts | it conflicts with its baseExits 1: it is merged or closed first | |
| sailfork wait pr 418 --push | its head gets a new commitExits 1: it is merged or closed first | |
| sailfork wait run <id> | a CI run finishesExits 1: the run failed | |
| sailfork wait held <id> | a person decides a held merge or previewExits 1: they decline |
Exit 12 means the timeout passed first. It is 10 minutes unless you pass --timeout. caisson and issue waits work the same way.
An app reports a check run, and the pull request waits for it.
An app gets a bot account, installations and a delivery log, and it can subscribe to 10 event types. Its OAuth provider takes dynamic client registration, so an MCP client signs in without a pasted token.
Check runsChecks acme/shop#418
test Sailfork CI, passed
tide-lint Tide Bot, 2 problems
src/cart/total.ts
11 export function total(price: number, rate: number) {12 const cents = Math.floor(price * 100 * (1 - rate));13 return cents;Rounding drops a cent. Math.floor turns 4999.9 into 4999. Round before you compare.
Fix it
tide-lint Tide Bot, passed on the next run
One merge reaches the wait, the subscription and the webhook.
Pull request 418 of acme/shop merges while a script waits on it. The webhook endpoint is down for the first try.
~/acme/shop $ sailfork wait pr 418 --merged --timeout 1h
open [5s]
open [10s]
open [15s]
Done: #418 merged
~/acme/shop $ echo $?
0
~/acme/shop $ sailfork events --subscription ci-merges
2026-11-22 14:06 acme/shop ci/run.pass - test.yml pass on welcome-code
2026-11-22 14:06 acme/shop#418 pull.merge ada merged Apply WELCOME10 once
2026-11-22 14:07 acme/shop ci/run.pass - deploy.yml pass on main
cursor: 48207
~/acme/shop $ sailfork api /api/repos/acme/shop/hooks/$HOOK/deliveries --jq '.deliveries[0] | "\(.event) \(.state) attempts=\(.attempts) status=\(.statusCode)"'
pull_request pending attempts=1 status=503
~/acme/shop $ sleep 10
~/acme/shop $ sailfork api /api/repos/acme/shop/hooks/$HOOK/deliveries --jq '.deliveries[0] | "\(.event) \(.state) attempts=\(.attempts) status=\(.statusCode)"'
pull_request delivered attempts=2 status=200
~/acme/shop $ Limits
- The event feed keeps 30 days of history, and webhook deliveries are kept 30 days.
- A webhook delivery gets 5 attempts, waiting 10 seconds, 1 minute, 5 minutes, 30 minutes between them, and an attempt with no answer in 10 seconds counts as failed.
- A repository has at most 20 webhooks, each with its own delivery history.
- The live stream sends a comment every 15 seconds to keep the line open, and a client that reconnects resumes from Last-Event-ID.
- sailfork wait checks every 5 seconds and gives up after 10 minutes with exit 12, unless you pass --timeout.