You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Events: the event door follows upstream's shared feed, with a connection status and endless retry #851
The event door follows upstream's first-party client:
one shared, lazily opened event source per client;
a bounded queue per subscriber, which fails a subscriber that falls behind;
per-subscriber filtering and the connected-marker replay;
endless reconnection with a connection status that a consumer can watch.
It is built on System.Threading.Channels, and it replaces the current pull-per-subscription door. It is not a second, opt-in door.
Upstream at the pin (v2.3.0)
packages/client/src/shared-events.ts:17, make: one source feeds independently filtered subscribers through 4,096-event queues.
The SDK today
Each SubscribeAsync opens its own SSE connection and reads only when the consumer pulls. A stream gives up after one minute of failed attempts. docs/architecture/client-runtime.md records both as intended divergences. A host with several event consumers opens one connection each, or writes its own fan-out.
Done when
A reviewed design is approved, covering the contract delta and its version impact under ADR-0034.
The door, the canon, the streaming guide and the tests follow it.
The SDK gets one shared event feed per client. It fans each server event out to every subscriber, and it owns reconnection and connection state, so a consumer composes nothing. These are the approved choices:
Retry: the feed reconnects forever, as upstream's connection layer does.
A late subscriber: it is admitted by a replay of the cached connection marker.
A slow subscriber: when its queue reaches 4,096 events, that subscriber fails with OpenCodeEventSubscriberOverflowException. The feed and the other subscribers continue.
Per-call Location: accepted, and nothing extra is sent.
onActivity: not admitted.
Connection state: exposed as virtual members on the events client, over an internal raw mode.
Version: the change ships in 2.0.0.
No subscribers: the state is Idle.
Event instances: subscribers share them, and the documentation says to treat them as read-only.
A fault in the feed: each subscriber receives its backlog before the fault.
Decoding: every frame is decoded.
Cancellation: it wins over a kept backlog. This is a recorded divergence from upstream.
The public names in the design (EventConnectionState, EventConnectionStatus, GetConnectionState, WatchConnectionAsync, OpenCodeEventSubscriberOverflowException) are confirmed with the maintainer in the pull request.
The first "Done when" item ("a reviewed design is approved") is met by this approval.
Activity
Blind-Striker commentedon Nov 14, 2026
Design approved (the maintainer, 2026-11-14).
The SDK gets one shared event feed per client. It fans each server event out to every subscriber, and it owns reconnection and connection state, so a consumer composes nothing. These are the approved choices:
OpenCodeEventSubscriberOverflowException. The feed and the other subscribers continue.Location: accepted, and nothing extra is sent.onActivity: not admitted.Idle.The public names in the design (
EventConnectionState,EventConnectionStatus,GetConnectionState,WatchConnectionAsync,OpenCodeEventSubscriberOverflowException) are confirmed with the maintainer in the pull request.The first "Done when" item ("a reviewed design is approved") is met by this approval.
refactor(events): the public door is hand-written over a generated ra…
test(events): the door's delegation row loads its events from fixtures (