release: explicitly close chat workflow writable (#607)
Summary
Releases #607 to main. Follow-up to #604 that closes the second half of the same bug: pre-#607 the chat-workflow's SSE response held its HTTP connection open until Vercel Workflow's runtime garbage-collected the run (~2 min observed), so the AI SDK chat hook stayed in `submitted` and the Stop button stayed visible.
Fix adds a closeChatStream "use step" invoked from runAgentWorkflow's finally alongside the existing clearChatActiveStream step, mirroring open-agents' Promise.all([clearActiveStream, sendFinish.then(closeStream)]) pattern.
Test plan
- Unit tests โ 3154 โ 3159 passing (+3
closeChatStreamcases, +2runAgentWorkflowcases) - Manual probe on PR #607's preview (results in this comment) โ curl exits in 503ms with full stream +
[DONE](was 2+ min). Post-stream probe showsisStreaming: falsewithin 3s. - Confirm Send button reverts within ~1s in the open-agents UI
๐ค Generated with Claude Code
Summary by cubic
Explicitly closes the chat SSE writable at the end of the workflow so the HTTP connection ends promptly and the UI un-sticks. Fixes chats stuck in submitted with the Stop button visible for minutes.
- Bug Fixes
- Added
closeChatStream"use step" to callwritable.close()and swallow already-closed errors. - Updated
runAgentWorkflowto runPromise.all([clearChatActiveStream, closeChatStream])infinallyfor immediate, parallel cleanup. - Added unit tests for
closeChatStreamand success/error paths inrunAgentWorkflow.
- Added