Repository navigation
feat(streaming): add automatic Thread SSE resumption - #35
Merged
Merged
Conversation
This was referenced Oct 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
Sessions.Threads.Events.NewResumableStreamto Forward and Managed. Retryable disconnects resume from the last received SSE cursor with request options preserved;session.thread_status_idlekeeps the subscription open, while Thread/Session termination or Session deletion ends it. Add a typedLast-Event-IDparameter to Managed Thread streams and keep the existing one-shot API available.Why
Thread event streams currently expose only a single connection, so callers must manage reconnection and cursor recovery themselves. The new opt-in helper reuses the Session retry engine while treating Thread termination as a normal end to the subscription.
Verification
make lintmake buildGOFLAGS=-count=1 make testmake docs-checkgo build ./examples/...All checks passed, including targeted Forward/Managed resumable-stream race tests, changelog validation, and 25 release automation tests. The complete Makefile test suite ran in a clean source copy matching this commit: the existing checkout contains an ignored historical
tmp/test directory with an obsolete API inventory. No maintained test was skipped. API docs were generated and checked in the Git checkout. Account-backed integration and QA-package acceptance remain pending after merge.Impact
CHANGELOG.mdunderUnreleased.env.live, logs, or generated test output committedAdditional context: this adds an SDK helper over existing HTTP routes, so the endpoint fixture inventory is unchanged. Dedicated behavioral contract tests and helper inventory entries were added. The change is additive and does not require migration or a version bump in this PR. The three SDK changes are submitted together on
codex/thread-sse-resumption.Related SDK PRs: python, ts.