· 8 min read

GitHub Can Wake Your Agent. The Event Is Not the Current State.

Share article

A review comment arrives. An agent starts preparing a fix. Before it finishes, the author pushes another commit and a maintainer closes the pull request. The notification was real. The action it appeared to request may no longer be appropriate.

GitHub announced Event Streams in preview on 17 November 2026. The announcement describes subscriptions to pull-request changes over an open connection without requiring a public webhook endpoint. Access is through an approved waitlist, across GitHub plans. That is a useful new transport option; it is not evidence that a consumer can skip checking current state. GitHub announcement

The engineering opportunity is to replace unnecessary polling while keeping a clear distinction between being notified and being ready to act. The design below is a proposed consumer architecture, not a claim about undocumented delivery guarantees in the preview.

AI-generated editorial concept: THE EVENT ARRIVED. IS IT STILL TRUE? GitHub wordmark above ivory signal waves meeting a mechanical clock and a clay branch symbol, lime connection.
AI-generated editorial concept; not a product screenshot, measured data or company endorsement.

Treat an event as a reason to inspect

An event says that something happened. The decision you need to make often concerns what is true now. Those questions can differ whenever other work happens between notification and action.

For a fictional review assistant, a review-submitted event should trigger an inspection of the pull request's current head, open state and relevant feedback. If the request is already closed, the assistant can record that no action is needed. If the head changed, it can determine whether the feedback still applies before editing anything.

This is not an accusation that the event stream is unreliable. It is a consequence of concurrent work. A perfectly delivered notification can refer to a state that another legitimate action has already changed. The consumer needs to account for that possibility regardless of transport quality.

Define the inspection step explicitly in the workflow. Otherwise, a later optimisation may remove it as an apparently redundant API call. The purpose of the read is to establish the decision's current context, not merely to retrieve information missing from the notification payload.

Separate receipt from completed work

Use distinct states for notification received, work scheduled, current state inspected, action attempted and outcome recorded. These states help explain where a consumer stopped when a process exits or a connection drops.

For the fictional assistant, receiving a review event should not immediately mark the review as handled. The assistant might crash before it reads the feedback. Equally, completing an edit should not be confused with successfully making that edit available to the reviewer. The workflow needs to record the outcome it actually achieved.

Choose durable records for the transitions that matter to recovery. A log line can help investigation, but a restart needs a reliable way to distinguish pending work from finished work. The exact storage choice depends on scale; a small application does not need a large distributed platform merely to preserve a work queue.

Keep the state names meaningful to an operator. “Processed” is ambiguous if it can mean received, inspected or acted upon. A clear state model makes it possible to resume work deliberately instead of rerunning everything and hoping the side effects are harmless.

Group work by the decision it affects

Several notifications may concern the same pull request while one inspection is already running. It may be wasteful to launch an independent agent session for each one. Instead, consider grouping pending work by repository and pull-request identity, then inspecting the latest relevant state.

This is a consumer design choice, not a guarantee that every event can be discarded safely. Some workflows need to preserve every historical transition. Others only need to know that the current state requires attention. Decide which kind of workflow you are building before introducing coalescing.

For a review assistant, the queue can record that another change arrived while it was working. When the current inspection ends, it checks whether another inspection is needed. That avoids assuming the first snapshot remains current throughout a long model run.

Preserve enough event history to explain why work was scheduled, subject to the application's retention and access policies. A compact decision record can be more useful than an unbounded transcript. The objective is to make recovery and debugging understandable without turning every notification into a separate expensive task.

Design the action around a specific version

Before producing a patch, bind the work to the revision inspected. Before applying it, check that the target still matches the assumptions. If it has changed, stop or re-evaluate according to a defined policy rather than silently treating the earlier result as current.

This matters even for actions that seem small. A comment about a line may become misleading after a new commit. A suggested fix may duplicate a change the author already made. An attempt to resolve a conversation may be inappropriate if a reviewer added new concerns.

Use an action record that names the target revision, the reason for acting and the observed outcome. Where the destination supports a suitable conditional operation, evaluate whether it can enforce the precondition. Where it does not, describe the remaining race and choose a conservative behaviour.

This is related to agent session handoff, but the focus is different. A session can carry its context correctly and still receive a stale trigger. The consumer must connect the proposed action to the current object, not only to the conversation that caused it.

Make reconnect a reconciliation event

An open connection is an operating condition, not a permanent property. Laptops sleep, networks change and processes restart. The consumer needs a documented reconnect path based on the actual preview documentation and its own durability requirements.

Do not assume replay, ordering or retention guarantees that you have not verified. If the application cannot establish continuity, perform a bounded reconciliation of the objects it owns or watches. Reconciliation should compare current state with recorded work, not blindly repeat every previous action.

Fictional reconnect routing: 7 need no work, 3 need fresh inspection, 2 are closed. Categories are exclusive. Not GitHub reliability statistics, incident data or agent performance.
Fictional reconnect routing: 7 need no work, 3 need fresh inspection, 2 are closed. Categories are exclusive. Not GitHub reliability statistics, incident data or agent performance.

The chart shows a fictional reconnect inspection of twelve watched pull requests: seven need no work, three need a fresh inspection and two are closed. These counts illustrate recovery routing only. They are not GitHub delivery statistics, outage data or agent performance measurements.

Bound the reconciliation so a restart does not create an uncontrolled burst. Define which objects are in scope, how work is prioritised and what happens if inspection fails. A recovery mechanism should restore understanding of state. It should not become a second, less controlled automation path that bypasses the normal checks.

Budget the work after the notification

Removing a polling loop can reduce unnecessary checks, but the expensive part of an assistant may be what happens after a real change. A stream that wakes an agent on every minor update can still produce excessive work if the consumer does not distinguish relevance.

Define a relevance filter before launching a long task. A closed pull request may only need a queue update. A new commit may require invalidating an old plan. A review with actionable feedback may deserve a full inspection. These are proposed policies, and the appropriate choices depend on the assistant's purpose.

Measure scheduled work, skipped work and completed outcomes separately. Do not present fewer API calls as a proven improvement in task quality. Likewise, do not count every notification as a useful agent action. A healthy consumer may correctly decide to do nothing for many events.

The earlier discussion of agent observability and cost asks whether a model call is needed at all. Event-driven systems still need that question. Better notification timing does not remove the responsibility to decide whether the next unit of work is useful.

Apply the same restraint to financial workflows

I’m building Arova, and event handling is a useful way to think about finance automation even though this article does not claim Arova uses GitHub Event Streams. A notification about a record should not become authority to act on whatever state the system happened to remember.

In a hypothetical accounting workflow, an approval notification could arrive after the underlying document was amended. The safe design question is whether the approval still refers to the same version. That example is illustrative, not a report of customer behaviour or an implemented Arova feature.

The principle is simple enough to explain without distributed-systems vocabulary: before doing the work, confirm that the thing approved is still the thing being acted upon. If it changed, make the discrepancy visible and route it to the appropriate decision maker.

This also improves support conversations. An operator can explain that a notification was received but the action was held because the target changed. That is more useful than an unexplained retry count or a claim that the system processed the event successfully.

Test the consumer by interrupting its assumptions

Use a controlled test environment to stop the consumer after receipt, after inspection and after an attempted action. Restart it and inspect the recorded outcome. The goal is to find the points where the system cannot distinguish unfinished work from completed work.

Add concurrent changes deliberately. Close the fictional pull request while the assistant is preparing a response. Push a new revision after inspection. Deliver two relevant triggers close together. Verify that the consumer follows its stated policy rather than relying on a convenient sequence of events.

Document what the system cannot yet guarantee. A preview integration can be useful within a narrow scope while some recovery questions remain unresolved. Keep that scope visible and avoid expanding from a laptop experiment to consequential automation on the strength of a smooth demonstration.

Event Streams offers a different way to learn that work may be waiting. A good consumer turns that signal into a fresh, bounded decision. The notification starts the process; current state, explicit preconditions and a recorded outcome are what let the process finish responsibly.

Share article
Related topics
GitHub Event Streamsevent-driven systemsagents

T
Full Stack Engineer at Grant Thornton Bharat. Building high-concurrency systems in Go and TypeScript.
← portfolio chat with tanmay ↗