Summary
Follow-up to #975 / #989.
After #756, interrupted states keep the stream open by design, and #989 correctly deprecated the misleading isFinal overloads on requiresInput / requiresAuth. We still need a supported way for server embeddings to complete the stream after emitting INPUT_REQUIRED / AUTH_REQUIRED.
Why
With SSE, only the server can complete the stream. The client can’t cleanly close it (dropping the connection still leaves server-side resources open until timeout). SSE is also one-way, so after INPUT_REQUIRED the client must send follow-up input via a new request anyway — keeping the original stream open doesn’t help that path, and unclosed connections become costly under load.
Prior discussion
Ask
Please consider adding an explicit close/hook API (exact shape TBD). Default can remain “stream stays open” per #756.
Summary
Follow-up to #975 / #989.
After #756, interrupted states keep the stream open by design, and #989 correctly deprecated the misleading
isFinaloverloads onrequiresInput/requiresAuth. We still need a supported way for server embeddings to complete the stream after emittingINPUT_REQUIRED/AUTH_REQUIRED.Why
With SSE, only the server can complete the stream. The client can’t cleanly close it (dropping the connection still leaves server-side resources open until timeout). SSE is also one-way, so after
INPUT_REQUIREDthe client must send follow-up input via a new request anyway — keeping the original stream open doesn’t help that path, and unclosed connections become costly under load.Prior discussion
isFinal=trueto close the stream; maintainers preferred not to, sinceisFinalisn’t in the spec and blurs task state vs connection lifecycle (comment).Ask
Please consider adding an explicit close/hook API (exact shape TBD). Default can remain “stream stays open” per #756.