diff --git a/bun.lock b/bun.lock index 899b1121a..d75d88c20 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "@coder/cmux", diff --git a/src/node/services/agentSession.ts b/src/node/services/agentSession.ts index 942d5105f..a2cf0a78e 100644 --- a/src/node/services/agentSession.ts +++ b/src/node/services/agentSession.ts @@ -92,6 +92,10 @@ export class AgentSession { return; } this.disposed = true; + + // Stop any active stream (fire and forget - disposal shouldn't block) + void this.aiService.stopStream(this.workspaceId, /* abandonPartial */ true); + for (const { event, handler } of this.aiListeners) { this.aiService.off(event, handler as never); }