Skip to content

Commit 4d22d4b

Browse files
committed
Update service.ts
1 parent be35c4f commit 4d22d4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/twig/src/main/services/agent/service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ export class AgentService extends TypedEventEmitter<AgentServiceEvents> {
393393
if (existing) {
394394
return existing;
395395
}
396+
397+
// Clean up any prior session for this taskRunId before creating a new one
398+
await this.cleanupSession(taskRunId);
396399
}
397400

398401
const channel = `agent-event:${taskRunId}`;

0 commit comments

Comments
 (0)