Skip to content

Conversation

@ethanndickson
Copy link
Member

When a workspace is deleted while an agent is streaming, the stream wasn't being interrupted and would continue running in the background.

Fix

Stop any active stream in AgentSession.dispose() before cleaning up listeners. This ensures streams are always stopped when the session is disposed, regardless of the disposal trigger.

Uses fire-and-forget semantics since disposal shouldn't block, and abandons the partial since the workspace is being deleted anyway.


Generated with mux

When a workspace is deleted while an agent is streaming, stop the stream
during AgentSession.dispose() to prevent it from continuing in the background.

Uses fire-and-forget semantics since disposal shouldn't block, and abandons
the partial since the workspace is being deleted anyway.
@ethanndickson ethanndickson added this pull request to the merge queue Dec 2, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2025
When a workspace is deleted while an agent is streaming, the stream
wasn't being interrupted and would continue running in the background.

## Fix

Stop any active stream in `AgentSession.dispose()` before cleaning up
listeners. This ensures streams are always stopped when the session is
disposed, regardless of the disposal trigger.

Uses fire-and-forget semantics since disposal shouldn't block, and
abandons the partial since the workspace is being deleted anyway.

---
_Generated with `mux`_
Merged via the queue into main with commit f1a6cae Dec 2, 2025
13 checks passed
@ethanndickson ethanndickson deleted the fix-workspace-deletion-stream-interrupt branch December 2, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant