Skip to content

Events and replay

Subscribe to changes and recover missed events without repeating work.

Theseus records an event when a guide finishes or a reviewer acts. A beacon, the workspace setting the CLI and API call an integration, delivers events to GitHub Actions or an HTTPS webhook, and Theseus keeps 30 days of history so a consumer can catch up after downtime.

EventRecorded when
guide.readyA guide is ready to read
guide.failedGenerating a guide failed
review.approvedA reviewer approves a guide
review.changes_requestedA reviewer requests changes
review.withdrawnA reviewer withdraws their decision
comment.createdSomeone posts a comment or reply
comment.editedThe author edits a comment or reply

The beacon form in Settings offers only the two guide events. Subscribe to the others from the CLI or API, by exact type, by family such as review.*, or * for everything. Quote wildcards in your shell:

theseus webhooks create --name "Review activity" \
  --events 'review.*,comment.created' \
  --repository example/project

A review event records one reviewer's action on one guide. It doesn't mean the PR is approved overall, that the latest push was reviewed, or that GitHub has the review yet.

A comment event carries references, not text: comment: { id, review_id, target, reply_to_comment_id }, and comment.edited adds edited_at. Read the comment through the API for its current text. target.kind says what the comment is on, for example fact with a change_id. A reply to a reviewer's decision has target: { kind: "review", review_id }, naming the review it answers.

Delivery guarantees

Link to this section
  • No delivery ordering. Concurrent delivery and retries can send older events after newer ones. Use current PR state rather than arrival order to decide which guide to act on.
  • At least once. Deduplicate on the event ID, and check guide.head_sha against the PR before changing code.
  • Accepted, not finished. A successful delivery means your endpoint or GitHub accepted the event, not that the work it started succeeded.
  • Forward only. A new beacon gets events recorded after it was created. Events recorded while the plan didn't include beacons are never delivered, even after you restore it; read them from event history, which doesn't send anything. An endpoint Theseus disabled can resend its failed deliveries when you turn it back on (see HTTPS webhooks). To deliver one old event again, resend it.

Catch up after downtime

Link to this section

List events since your consumer last processed one successfully, oldest first, as an ISO 8601 UTC time within the last 30 days:

since='2026-10-08T12:00:00Z' # replace with your last successful processing time
theseus events list --type 'guide.*' \
  --repository example/project \
  --since "$since" --json

The result has data, next_cursor, has_more and truncated.

  1. Process data, skipping event IDs you've already handled.

  2. Save next_cursor only after processing succeeds.

  3. While has_more is true, fetch the next page with --cursor and the same filters, including --since and --until:

    theseus events list --type 'guide.*' \
      --repository example/project \
      --since "$since" \
      --cursor "$cursor" --json
  4. Keep the last cursor, even from an empty page, and poll with it for new events.

--until excludes events at or after that time. Each read rechecks your repository access and skips what you can't see; if you gain access later, start a new listing to read that history.

truncated: true means the 30-day retention has deleted events somewhere in the workspace, not necessarily in your repository. Check the PRs you care about in Theseus.

Fetch the full review

Link to this section

Events carry IDs, not comment or review text. Fetch the content from the API with a token that has read:

From the eventCall
changeset.id (review and comment events)/api/v1/changesets/{id} and /api/v1/changesets/{id}/review-state
review.decision_action_id/api/v1/review-actions/{id}
guide.id/api/v1/guides/{id}/comments and /api/v1/guides/{id}/decisions (read every page)

Guide events have no changeset.id; resolve the PR from the repository and PR number instead.

The decisions list holds each reviewer's current decision on that guide; none means they withdrew it. Review state says whether each decision still applies to the PR's current head (or that this is unknown), and whether the same reviewer has since replaced it. If its complete is false, there's more history than one read returns.

Event history fields

Link to this section

Event history and GitHub Actions payloads name the event's time occurred_at; HTTPS webhook bodies call the same value timestamp. History also has an origin: events marked backfill describe older work Theseus imported, and beacons never receive them.